@nxtedition/rocksdb 6.0.0 → 6.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/BUILDING.md +18 -0
  2. package/binding.cc +16 -17
  3. package/binding.gyp +2 -2
  4. package/deps/rocksdb/build_version.cc +4 -10
  5. package/deps/rocksdb/rocksdb/CMakeLists.txt +26 -3
  6. package/deps/rocksdb/rocksdb/Makefile +73 -91
  7. package/deps/rocksdb/rocksdb/TARGETS +27 -2
  8. package/deps/rocksdb/rocksdb/cache/cache_test.cc +29 -17
  9. package/deps/rocksdb/rocksdb/cache/fast_lru_cache.cc +511 -0
  10. package/deps/rocksdb/rocksdb/cache/fast_lru_cache.h +299 -0
  11. package/deps/rocksdb/rocksdb/cache/lru_cache.cc +3 -0
  12. package/deps/rocksdb/rocksdb/cache/lru_cache.h +7 -0
  13. package/deps/rocksdb/rocksdb/cmake/modules/CxxFlags.cmake +7 -0
  14. package/deps/rocksdb/rocksdb/cmake/modules/FindJeMalloc.cmake +29 -0
  15. package/deps/rocksdb/rocksdb/cmake/modules/FindNUMA.cmake +29 -0
  16. package/deps/rocksdb/rocksdb/cmake/modules/FindSnappy.cmake +29 -0
  17. package/deps/rocksdb/rocksdb/cmake/modules/FindTBB.cmake +33 -0
  18. package/deps/rocksdb/rocksdb/cmake/modules/Findgflags.cmake +29 -0
  19. package/deps/rocksdb/rocksdb/cmake/modules/Findlz4.cmake +29 -0
  20. package/deps/rocksdb/rocksdb/cmake/modules/Finduring.cmake +26 -0
  21. package/deps/rocksdb/rocksdb/cmake/modules/Findzstd.cmake +29 -0
  22. package/deps/rocksdb/rocksdb/cmake/modules/ReadVersion.cmake +10 -0
  23. package/deps/rocksdb/rocksdb/common.mk +30 -0
  24. package/deps/rocksdb/rocksdb/crash_test.mk +3 -3
  25. package/deps/rocksdb/rocksdb/db/arena_wrapped_db_iter.cc +1 -1
  26. package/deps/rocksdb/rocksdb/db/blob/blob_index.h +3 -3
  27. package/deps/rocksdb/rocksdb/db/blob/db_blob_index_test.cc +7 -7
  28. package/deps/rocksdb/rocksdb/db/builder.cc +22 -7
  29. package/deps/rocksdb/rocksdb/db/c.cc +71 -0
  30. package/deps/rocksdb/rocksdb/db/c_test.c +28 -2
  31. package/deps/rocksdb/rocksdb/db/column_family.cc +12 -5
  32. package/deps/rocksdb/rocksdb/db/column_family_test.cc +23 -22
  33. package/deps/rocksdb/rocksdb/db/compact_files_test.cc +11 -11
  34. package/deps/rocksdb/rocksdb/db/compaction/compaction.cc +2 -2
  35. package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator.cc +36 -10
  36. package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator.h +4 -1
  37. package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator_test.cc +3 -2
  38. package/deps/rocksdb/rocksdb/db/compaction/compaction_job.cc +54 -16
  39. package/deps/rocksdb/rocksdb/db/compaction/compaction_job.h +14 -2
  40. package/deps/rocksdb/rocksdb/db/compaction/compaction_job_stats_test.cc +3 -3
  41. package/deps/rocksdb/rocksdb/db/compaction/compaction_job_test.cc +85 -18
  42. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker.cc +7 -7
  43. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_level.cc +1 -1
  44. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_test.cc +23 -22
  45. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_universal.cc +1 -1
  46. package/deps/rocksdb/rocksdb/db/compaction/compaction_service_test.cc +151 -32
  47. package/deps/rocksdb/rocksdb/db/comparator_db_test.cc +1 -1
  48. package/deps/rocksdb/rocksdb/db/convenience.cc +8 -6
  49. package/deps/rocksdb/rocksdb/db/corruption_test.cc +209 -38
  50. package/deps/rocksdb/rocksdb/db/cuckoo_table_db_test.cc +2 -2
  51. package/deps/rocksdb/rocksdb/db/db_basic_test.cc +404 -32
  52. package/deps/rocksdb/rocksdb/db/db_block_cache_test.cc +28 -25
  53. package/deps/rocksdb/rocksdb/db/db_bloom_filter_test.cc +85 -138
  54. package/deps/rocksdb/rocksdb/db/db_compaction_filter_test.cc +68 -3
  55. package/deps/rocksdb/rocksdb/db/db_compaction_test.cc +38 -13
  56. package/deps/rocksdb/rocksdb/db/db_filesnapshot.cc +1 -1
  57. package/deps/rocksdb/rocksdb/db/db_flush_test.cc +1 -1
  58. package/deps/rocksdb/rocksdb/db/db_impl/db_impl.cc +11 -20
  59. package/deps/rocksdb/rocksdb/db/db_impl/db_impl.h +15 -1
  60. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc +12 -9
  61. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_debug.cc +5 -4
  62. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_experimental.cc +1 -1
  63. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_files.cc +2 -2
  64. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_open.cc +42 -10
  65. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_readonly.cc +54 -23
  66. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_readonly.h +3 -0
  67. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_secondary.cc +14 -4
  68. package/deps/rocksdb/rocksdb/db/db_info_dumper.cc +26 -18
  69. package/deps/rocksdb/rocksdb/db/db_iter_stress_test.cc +8 -7
  70. package/deps/rocksdb/rocksdb/db/db_iter_test.cc +8 -8
  71. package/deps/rocksdb/rocksdb/db/db_iterator_test.cc +6 -3
  72. package/deps/rocksdb/rocksdb/db/db_kv_checksum_test.cc +2 -2
  73. package/deps/rocksdb/rocksdb/db/db_log_iter_test.cc +6 -6
  74. package/deps/rocksdb/rocksdb/db/db_memtable_test.cc +2 -2
  75. package/deps/rocksdb/rocksdb/db/db_options_test.cc +28 -12
  76. package/deps/rocksdb/rocksdb/db/db_properties_test.cc +16 -15
  77. package/deps/rocksdb/rocksdb/db/db_range_del_test.cc +6 -4
  78. package/deps/rocksdb/rocksdb/db/db_readonly_with_timestamp_test.cc +331 -0
  79. package/deps/rocksdb/rocksdb/db/db_secondary_test.cc +11 -6
  80. package/deps/rocksdb/rocksdb/db/db_sst_test.cc +68 -7
  81. package/deps/rocksdb/rocksdb/db/db_table_properties_test.cc +6 -5
  82. package/deps/rocksdb/rocksdb/db/db_test.cc +60 -42
  83. package/deps/rocksdb/rocksdb/db/db_test2.cc +244 -111
  84. package/deps/rocksdb/rocksdb/db/db_test_util.cc +101 -19
  85. package/deps/rocksdb/rocksdb/db/db_test_util.h +52 -2
  86. package/deps/rocksdb/rocksdb/db/db_universal_compaction_test.cc +1 -1
  87. package/deps/rocksdb/rocksdb/db/db_wal_test.cc +7 -7
  88. package/deps/rocksdb/rocksdb/db/db_with_timestamp_basic_test.cc +5 -175
  89. package/deps/rocksdb/rocksdb/db/db_with_timestamp_test_util.cc +96 -0
  90. package/deps/rocksdb/rocksdb/db/db_with_timestamp_test_util.h +126 -0
  91. package/deps/rocksdb/rocksdb/db/db_write_test.cc +6 -6
  92. package/deps/rocksdb/rocksdb/db/dbformat.h +2 -1
  93. package/deps/rocksdb/rocksdb/db/deletefile_test.cc +1 -1
  94. package/deps/rocksdb/rocksdb/db/error_handler_fs_test.cc +8 -8
  95. package/deps/rocksdb/rocksdb/db/experimental.cc +1 -1
  96. package/deps/rocksdb/rocksdb/db/external_sst_file_basic_test.cc +91 -12
  97. package/deps/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc +16 -2
  98. package/deps/rocksdb/rocksdb/db/external_sst_file_ingestion_job.h +2 -0
  99. package/deps/rocksdb/rocksdb/db/external_sst_file_test.cc +7 -7
  100. package/deps/rocksdb/rocksdb/db/file_indexer.h +1 -4
  101. package/deps/rocksdb/rocksdb/db/flush_job.cc +28 -15
  102. package/deps/rocksdb/rocksdb/db/flush_job.h +4 -0
  103. package/deps/rocksdb/rocksdb/db/flush_job_test.cc +98 -30
  104. package/deps/rocksdb/rocksdb/db/forward_iterator.cc +1 -1
  105. package/deps/rocksdb/rocksdb/db/import_column_family_job.cc +14 -1
  106. package/deps/rocksdb/rocksdb/db/import_column_family_test.cc +6 -0
  107. package/deps/rocksdb/rocksdb/db/internal_stats.cc +12 -12
  108. package/deps/rocksdb/rocksdb/db/listener_test.cc +4 -3
  109. package/deps/rocksdb/rocksdb/db/memtable.cc +2 -2
  110. package/deps/rocksdb/rocksdb/db/memtable_list.h +1 -1
  111. package/deps/rocksdb/rocksdb/db/memtable_list_test.cc +37 -25
  112. package/deps/rocksdb/rocksdb/db/obsolete_files_test.cc +1 -1
  113. package/deps/rocksdb/rocksdb/db/perf_context_test.cc +18 -18
  114. package/deps/rocksdb/rocksdb/db/plain_table_db_test.cc +6 -6
  115. package/deps/rocksdb/rocksdb/db/prefix_test.cc +1 -1
  116. package/deps/rocksdb/rocksdb/db/repair.cc +13 -2
  117. package/deps/rocksdb/rocksdb/db/repair_test.cc +37 -15
  118. package/deps/rocksdb/rocksdb/db/snapshot_checker.h +1 -2
  119. package/deps/rocksdb/rocksdb/db/snapshot_impl.h +3 -1
  120. package/deps/rocksdb/rocksdb/db/table_cache.cc +20 -130
  121. package/deps/rocksdb/rocksdb/db/table_cache.h +3 -2
  122. package/deps/rocksdb/rocksdb/db/table_cache_sync_and_async.h +140 -0
  123. package/deps/rocksdb/rocksdb/db/version_builder.cc +1 -1
  124. package/deps/rocksdb/rocksdb/db/version_builder_test.cc +133 -133
  125. package/deps/rocksdb/rocksdb/db/version_edit.cc +22 -2
  126. package/deps/rocksdb/rocksdb/db/version_edit.h +13 -4
  127. package/deps/rocksdb/rocksdb/db/version_edit_test.cc +14 -14
  128. package/deps/rocksdb/rocksdb/db/version_set.cc +207 -214
  129. package/deps/rocksdb/rocksdb/db/version_set.h +14 -3
  130. package/deps/rocksdb/rocksdb/db/version_set_sync_and_async.h +154 -0
  131. package/deps/rocksdb/rocksdb/db/version_set_test.cc +10 -9
  132. package/deps/rocksdb/rocksdb/db/wal_edit.h +2 -1
  133. package/deps/rocksdb/rocksdb/db/wal_manager.cc +2 -3
  134. package/deps/rocksdb/rocksdb/db/wal_manager_test.cc +1 -1
  135. package/deps/rocksdb/rocksdb/db/write_batch.cc +178 -30
  136. package/deps/rocksdb/rocksdb/db/write_batch_test.cc +6 -6
  137. package/deps/rocksdb/rocksdb/db/write_controller.h +1 -1
  138. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_common.cc +0 -2
  139. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_common.h +9 -6
  140. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_compaction_filter.h +2 -1
  141. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_driver.cc +4 -3
  142. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_gflags.cc +44 -6
  143. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_listener.cc +4 -1
  144. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_shared_state.cc +0 -10
  145. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_shared_state.h +45 -42
  146. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_test_base.cc +374 -275
  147. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_test_base.h +53 -3
  148. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_tool.cc +0 -12
  149. package/deps/rocksdb/rocksdb/db_stress_tool/expected_state.cc +13 -11
  150. package/deps/rocksdb/rocksdb/db_stress_tool/multi_ops_txns_stress.cc +276 -109
  151. package/deps/rocksdb/rocksdb/db_stress_tool/multi_ops_txns_stress.h +63 -0
  152. package/deps/rocksdb/rocksdb/db_stress_tool/no_batched_ops_stress.cc +45 -54
  153. package/deps/rocksdb/rocksdb/env/composite_env.cc +87 -14
  154. package/deps/rocksdb/rocksdb/env/env.cc +0 -60
  155. package/deps/rocksdb/rocksdb/env/env_encryption.cc +9 -0
  156. package/deps/rocksdb/rocksdb/env/env_encryption_ctr.h +1 -1
  157. package/deps/rocksdb/rocksdb/env/env_posix.cc +6 -5
  158. package/deps/rocksdb/rocksdb/env/env_test.cc +18 -5
  159. package/deps/rocksdb/rocksdb/env/fs_posix.cc +17 -12
  160. package/deps/rocksdb/rocksdb/env/io_posix.cc +39 -37
  161. package/deps/rocksdb/rocksdb/file/delete_scheduler_test.cc +9 -9
  162. package/deps/rocksdb/rocksdb/file/file_prefetch_buffer.cc +159 -65
  163. package/deps/rocksdb/rocksdb/file/file_prefetch_buffer.h +44 -22
  164. package/deps/rocksdb/rocksdb/file/file_util.h +2 -0
  165. package/deps/rocksdb/rocksdb/file/prefetch_test.cc +142 -17
  166. package/deps/rocksdb/rocksdb/file/random_access_file_reader.h +5 -2
  167. package/deps/rocksdb/rocksdb/file/sequence_file_reader.cc +7 -0
  168. package/deps/rocksdb/rocksdb/file/writable_file_writer.cc +60 -40
  169. package/deps/rocksdb/rocksdb/file/writable_file_writer.h +1 -0
  170. package/deps/rocksdb/rocksdb/include/rocksdb/advanced_options.h +23 -5
  171. package/deps/rocksdb/rocksdb/include/rocksdb/c.h +49 -1
  172. package/deps/rocksdb/rocksdb/include/rocksdb/cache.h +5 -5
  173. package/deps/rocksdb/rocksdb/include/rocksdb/cleanable.h +59 -2
  174. package/deps/rocksdb/rocksdb/include/rocksdb/compaction_filter.h +1 -0
  175. package/deps/rocksdb/rocksdb/include/rocksdb/convenience.h +2 -1
  176. package/deps/rocksdb/rocksdb/include/rocksdb/db.h +46 -44
  177. package/deps/rocksdb/rocksdb/include/rocksdb/env.h +1 -1
  178. package/deps/rocksdb/rocksdb/include/rocksdb/file_system.h +2 -0
  179. package/deps/rocksdb/rocksdb/include/rocksdb/iostats_context.h +2 -4
  180. package/deps/rocksdb/rocksdb/include/rocksdb/memtablerep.h +3 -0
  181. package/deps/rocksdb/rocksdb/include/rocksdb/options.h +45 -3
  182. package/deps/rocksdb/rocksdb/include/rocksdb/perf_context.h +2 -0
  183. package/deps/rocksdb/rocksdb/include/rocksdb/snapshot.h +4 -1
  184. package/deps/rocksdb/rocksdb/include/rocksdb/statistics.h +3 -0
  185. package/deps/rocksdb/rocksdb/include/rocksdb/table.h +91 -40
  186. package/deps/rocksdb/rocksdb/include/rocksdb/thread_status.h +1 -2
  187. package/deps/rocksdb/rocksdb/include/rocksdb/unique_id.h +22 -13
  188. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/customizable_util.h +9 -0
  189. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/ldb_cmd.h +4 -0
  190. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/object_registry.h +25 -0
  191. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/options_type.h +378 -103
  192. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/transaction_db.h +14 -0
  193. package/deps/rocksdb/rocksdb/include/rocksdb/version.h +2 -2
  194. package/deps/rocksdb/rocksdb/include/rocksdb/write_batch.h +18 -4
  195. package/deps/rocksdb/rocksdb/memory/arena.h +1 -1
  196. package/deps/rocksdb/rocksdb/memory/concurrent_arena.cc +1 -5
  197. package/deps/rocksdb/rocksdb/memory/concurrent_arena.h +1 -5
  198. package/deps/rocksdb/rocksdb/memory/jemalloc_nodump_allocator.cc +6 -8
  199. package/deps/rocksdb/rocksdb/memtable/skiplistrep.cc +1 -1
  200. package/deps/rocksdb/rocksdb/memtable/write_buffer_manager.cc +1 -1
  201. package/deps/rocksdb/rocksdb/memtable/write_buffer_manager_test.cc +5 -3
  202. package/deps/rocksdb/rocksdb/microbench/db_basic_bench.cc +266 -45
  203. package/deps/rocksdb/rocksdb/monitoring/histogram.cc +2 -1
  204. package/deps/rocksdb/rocksdb/monitoring/iostats_context.cc +1 -4
  205. package/deps/rocksdb/rocksdb/monitoring/iostats_context_imp.h +4 -4
  206. package/deps/rocksdb/rocksdb/monitoring/perf_context.cc +7 -8
  207. package/deps/rocksdb/rocksdb/monitoring/perf_context_imp.h +2 -2
  208. package/deps/rocksdb/rocksdb/monitoring/perf_level.cc +1 -5
  209. package/deps/rocksdb/rocksdb/monitoring/perf_level_imp.h +1 -5
  210. package/deps/rocksdb/rocksdb/monitoring/persistent_stats_history.cc +2 -2
  211. package/deps/rocksdb/rocksdb/monitoring/statistics.cc +1 -1
  212. package/deps/rocksdb/rocksdb/monitoring/thread_status_updater.cc +2 -1
  213. package/deps/rocksdb/rocksdb/monitoring/thread_status_updater.h +1 -1
  214. package/deps/rocksdb/rocksdb/monitoring/thread_status_util.cc +3 -3
  215. package/deps/rocksdb/rocksdb/monitoring/thread_status_util.h +2 -2
  216. package/deps/rocksdb/rocksdb/options/cf_options.cc +47 -38
  217. package/deps/rocksdb/rocksdb/options/configurable.cc +9 -27
  218. package/deps/rocksdb/rocksdb/options/configurable_test.cc +1 -1
  219. package/deps/rocksdb/rocksdb/options/customizable.cc +3 -1
  220. package/deps/rocksdb/rocksdb/options/customizable_test.cc +379 -318
  221. package/deps/rocksdb/rocksdb/options/db_options.cc +46 -17
  222. package/deps/rocksdb/rocksdb/options/db_options.h +2 -0
  223. package/deps/rocksdb/rocksdb/options/options.cc +7 -0
  224. package/deps/rocksdb/rocksdb/options/options_helper.cc +86 -39
  225. package/deps/rocksdb/rocksdb/options/options_parser.cc +10 -10
  226. package/deps/rocksdb/rocksdb/options/options_settable_test.cc +12 -7
  227. package/deps/rocksdb/rocksdb/options/options_test.cc +222 -68
  228. package/deps/rocksdb/rocksdb/port/port_posix.h +0 -15
  229. package/deps/rocksdb/rocksdb/port/win/env_win.cc +5 -4
  230. package/deps/rocksdb/rocksdb/port/win/env_win.h +2 -2
  231. package/deps/rocksdb/rocksdb/port/win/port_win.h +0 -31
  232. package/deps/rocksdb/rocksdb/rocksdb.pc.in +11 -0
  233. package/deps/rocksdb/rocksdb/src.mk +6 -1
  234. package/deps/rocksdb/rocksdb/table/block_based/binary_search_index_reader.cc +2 -1
  235. package/deps/rocksdb/rocksdb/table/block_based/block.cc +4 -2
  236. package/deps/rocksdb/rocksdb/table/block_based/block.h +21 -25
  237. package/deps/rocksdb/rocksdb/table/block_based/block_based_filter_block.cc +3 -4
  238. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_builder.cc +23 -8
  239. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_factory.cc +52 -15
  240. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_iterator.cc +81 -7
  241. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_iterator.h +8 -2
  242. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc +94 -726
  243. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader.h +21 -15
  244. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_impl.h +9 -3
  245. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_sync_and_async.h +754 -0
  246. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_test.cc +44 -73
  247. package/deps/rocksdb/rocksdb/table/block_based/block_prefetcher.cc +15 -5
  248. package/deps/rocksdb/rocksdb/table/block_based/block_prefetcher.h +2 -1
  249. package/deps/rocksdb/rocksdb/table/block_based/filter_block.h +2 -11
  250. package/deps/rocksdb/rocksdb/table/block_based/filter_block_reader_common.cc +59 -1
  251. package/deps/rocksdb/rocksdb/table/block_based/filter_block_reader_common.h +18 -0
  252. package/deps/rocksdb/rocksdb/table/block_based/filter_policy.cc +33 -17
  253. package/deps/rocksdb/rocksdb/table/block_based/full_filter_block.cc +0 -61
  254. package/deps/rocksdb/rocksdb/table/block_based/full_filter_block.h +0 -13
  255. package/deps/rocksdb/rocksdb/table/block_based/hash_index_reader.cc +2 -1
  256. package/deps/rocksdb/rocksdb/table/block_based/index_builder.h +2 -2
  257. package/deps/rocksdb/rocksdb/table/block_based/index_reader_common.cc +3 -2
  258. package/deps/rocksdb/rocksdb/table/block_based/index_reader_common.h +2 -1
  259. package/deps/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc +3 -2
  260. package/deps/rocksdb/rocksdb/table/block_based/partitioned_index_iterator.cc +4 -3
  261. package/deps/rocksdb/rocksdb/table/block_based/partitioned_index_reader.cc +8 -4
  262. package/deps/rocksdb/rocksdb/table/block_based/reader_common.cc +4 -4
  263. package/deps/rocksdb/rocksdb/table/block_based/uncompression_dict_reader.cc +2 -1
  264. package/deps/rocksdb/rocksdb/table/block_fetcher.cc +65 -7
  265. package/deps/rocksdb/rocksdb/table/block_fetcher.h +2 -0
  266. package/deps/rocksdb/rocksdb/table/cleanable_test.cc +113 -0
  267. package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_builder.cc +1 -1
  268. package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_builder.h +1 -1
  269. package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_reader_test.cc +1 -1
  270. package/deps/rocksdb/rocksdb/table/format.cc +22 -20
  271. package/deps/rocksdb/rocksdb/table/iterator.cc +1 -81
  272. package/deps/rocksdb/rocksdb/table/merging_iterator.cc +39 -0
  273. package/deps/rocksdb/rocksdb/table/meta_blocks.cc +2 -2
  274. package/deps/rocksdb/rocksdb/table/multiget_context.h +60 -13
  275. package/deps/rocksdb/rocksdb/table/persistent_cache_options.h +0 -3
  276. package/deps/rocksdb/rocksdb/table/plain/plain_table_factory.cc +12 -1
  277. package/deps/rocksdb/rocksdb/table/plain/plain_table_reader.cc +4 -4
  278. package/deps/rocksdb/rocksdb/table/sst_file_dumper.cc +2 -1
  279. package/deps/rocksdb/rocksdb/table/sst_file_dumper.h +1 -1
  280. package/deps/rocksdb/rocksdb/table/sst_file_writer_collectors.h +1 -1
  281. package/deps/rocksdb/rocksdb/table/table_properties.cc +3 -5
  282. package/deps/rocksdb/rocksdb/table/table_reader.h +13 -0
  283. package/deps/rocksdb/rocksdb/table/table_test.cc +202 -78
  284. package/deps/rocksdb/rocksdb/table/unique_id.cc +84 -25
  285. package/deps/rocksdb/rocksdb/table/unique_id_impl.h +37 -4
  286. package/deps/rocksdb/rocksdb/test_util/testutil.cc +3 -1
  287. package/deps/rocksdb/rocksdb/test_util/testutil.h +11 -8
  288. package/deps/rocksdb/rocksdb/test_util/transaction_test_util.cc +8 -4
  289. package/deps/rocksdb/rocksdb/test_util/transaction_test_util.h +17 -0
  290. package/deps/rocksdb/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.cc +11 -9
  291. package/deps/rocksdb/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer_test.cc +3 -3
  292. package/deps/rocksdb/rocksdb/tools/db_bench_tool.cc +277 -105
  293. package/deps/rocksdb/rocksdb/tools/db_sanity_test.cc +4 -4
  294. package/deps/rocksdb/rocksdb/tools/ldb_cmd.cc +186 -42
  295. package/deps/rocksdb/rocksdb/tools/ldb_cmd_impl.h +75 -49
  296. package/deps/rocksdb/rocksdb/tools/ldb_cmd_test.cc +9 -8
  297. package/deps/rocksdb/rocksdb/tools/ldb_tool.cc +4 -1
  298. package/deps/rocksdb/rocksdb/tools/reduce_levels_test.cc +2 -2
  299. package/deps/rocksdb/rocksdb/tools/sst_dump_tool.cc +26 -4
  300. package/deps/rocksdb/rocksdb/tools/trace_analyzer_tool.cc +1 -1
  301. package/deps/rocksdb/rocksdb/trace_replay/block_cache_tracer.h +1 -1
  302. package/deps/rocksdb/rocksdb/util/async_file_reader.cc +72 -0
  303. package/deps/rocksdb/rocksdb/util/async_file_reader.h +144 -0
  304. package/deps/rocksdb/rocksdb/util/autovector_test.cc +4 -4
  305. package/deps/rocksdb/rocksdb/util/bloom_test.cc +14 -8
  306. package/deps/rocksdb/rocksdb/util/build_version.cc.in +5 -6
  307. package/deps/rocksdb/rocksdb/util/cleanable.cc +180 -0
  308. package/deps/rocksdb/rocksdb/util/comparator.cc +5 -3
  309. package/deps/rocksdb/rocksdb/util/compression.h +56 -7
  310. package/deps/rocksdb/rocksdb/util/coro_utils.h +111 -0
  311. package/deps/rocksdb/rocksdb/util/file_reader_writer_test.cc +148 -0
  312. package/deps/rocksdb/rocksdb/util/filelock_test.cc +2 -2
  313. package/deps/rocksdb/rocksdb/util/filter_bench.cc +12 -4
  314. package/deps/rocksdb/rocksdb/util/heap.h +5 -3
  315. package/deps/rocksdb/rocksdb/util/random.cc +1 -5
  316. package/deps/rocksdb/rocksdb/util/rate_limiter.cc +12 -9
  317. package/deps/rocksdb/rocksdb/util/rate_limiter_test.cc +1 -1
  318. package/deps/rocksdb/rocksdb/util/ribbon_alg.h +1 -1
  319. package/deps/rocksdb/rocksdb/util/ribbon_test.cc +2 -4
  320. package/deps/rocksdb/rocksdb/util/single_thread_executor.h +55 -0
  321. package/deps/rocksdb/rocksdb/util/slice.cc +8 -9
  322. package/deps/rocksdb/rocksdb/util/string_util.cc +3 -2
  323. package/deps/rocksdb/rocksdb/util/string_util.h +0 -13
  324. package/deps/rocksdb/rocksdb/util/thread_local.cc +4 -23
  325. package/deps/rocksdb/rocksdb/utilities/backup/backup_engine.cc +99 -22
  326. package/deps/rocksdb/rocksdb/utilities/backup/backup_engine_impl.h +7 -0
  327. package/deps/rocksdb/rocksdb/utilities/backup/backup_engine_test.cc +102 -59
  328. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_test.cc +38 -36
  329. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_dump_tool.cc +2 -2
  330. package/deps/rocksdb/rocksdb/utilities/fault_injection_fs.cc +28 -0
  331. package/deps/rocksdb/rocksdb/utilities/fault_injection_fs.h +3 -0
  332. package/deps/rocksdb/rocksdb/utilities/memory/memory_test.cc +1 -1
  333. package/deps/rocksdb/rocksdb/utilities/object_registry.cc +71 -0
  334. package/deps/rocksdb/rocksdb/utilities/object_registry_test.cc +71 -0
  335. package/deps/rocksdb/rocksdb/utilities/options/options_util_test.cc +1 -1
  336. package/deps/rocksdb/rocksdb/utilities/simulator_cache/sim_cache_test.cc +5 -5
  337. package/deps/rocksdb/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.cc +3 -3
  338. package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_tracker.cc +0 -13
  339. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_locking_test.cc +40 -0
  340. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.cc +10 -8
  341. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.h +4 -2
  342. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +17 -0
  343. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc +7 -7
  344. package/deps/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction.cc +8 -1
  345. package/deps/rocksdb/rocksdb/utilities/transactions/snapshot_checker.cc +5 -1
  346. package/deps/rocksdb/rocksdb/utilities/transactions/transaction_test.cc +21 -15
  347. package/deps/rocksdb/rocksdb/utilities/transactions/transaction_util.cc +2 -2
  348. package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_transaction_test.cc +69 -11
  349. package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn.cc +22 -9
  350. package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.cc +26 -5
  351. package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.h +17 -4
  352. package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_transaction_test.cc +19 -16
  353. package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn.cc +7 -3
  354. package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index.cc +3 -2
  355. package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.cc +2 -2
  356. package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.h +2 -2
  357. package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_test.cc +6 -6
  358. package/deps/rocksdb/rocksdb.gyp +47 -37
  359. package/package-lock.json +23687 -0
  360. package/package.json +2 -30
  361. package/prebuilds/darwin-arm64/node.napi.node +0 -0
  362. package/prebuilds/darwin-x64/node.napi.node +0 -0
  363. package/prebuilds/linux-x64/node.napi.node +0 -0
  364. package/deps/liburing/liburing/README +0 -46
  365. package/deps/liburing/liburing/test/232c93d07b74-test.c +0 -305
  366. package/deps/liburing/liburing/test/35fa71a030ca-test.c +0 -329
  367. package/deps/liburing/liburing/test/500f9fbadef8-test.c +0 -89
  368. package/deps/liburing/liburing/test/7ad0e4b2f83c-test.c +0 -93
  369. package/deps/liburing/liburing/test/8a9973408177-test.c +0 -106
  370. package/deps/liburing/liburing/test/917257daa0fe-test.c +0 -53
  371. package/deps/liburing/liburing/test/Makefile +0 -312
  372. package/deps/liburing/liburing/test/a0908ae19763-test.c +0 -58
  373. package/deps/liburing/liburing/test/a4c0b3decb33-test.c +0 -180
  374. package/deps/liburing/liburing/test/accept-link.c +0 -251
  375. package/deps/liburing/liburing/test/accept-reuse.c +0 -164
  376. package/deps/liburing/liburing/test/accept-test.c +0 -79
  377. package/deps/liburing/liburing/test/accept.c +0 -476
  378. package/deps/liburing/liburing/test/across-fork.c +0 -283
  379. package/deps/liburing/liburing/test/b19062a56726-test.c +0 -53
  380. package/deps/liburing/liburing/test/b5837bd5311d-test.c +0 -77
  381. package/deps/liburing/liburing/test/ce593a6c480a-test.c +0 -135
  382. package/deps/liburing/liburing/test/close-opath.c +0 -122
  383. package/deps/liburing/liburing/test/config +0 -10
  384. package/deps/liburing/liburing/test/connect.c +0 -398
  385. package/deps/liburing/liburing/test/cq-full.c +0 -96
  386. package/deps/liburing/liburing/test/cq-overflow.c +0 -294
  387. package/deps/liburing/liburing/test/cq-peek-batch.c +0 -102
  388. package/deps/liburing/liburing/test/cq-ready.c +0 -94
  389. package/deps/liburing/liburing/test/cq-size.c +0 -58
  390. package/deps/liburing/liburing/test/d4ae271dfaae-test.c +0 -96
  391. package/deps/liburing/liburing/test/d77a67ed5f27-test.c +0 -65
  392. package/deps/liburing/liburing/test/defer.c +0 -307
  393. package/deps/liburing/liburing/test/double-poll-crash.c +0 -186
  394. package/deps/liburing/liburing/test/eeed8b54e0df-test.c +0 -114
  395. package/deps/liburing/liburing/test/empty-eownerdead.c +0 -42
  396. package/deps/liburing/liburing/test/eventfd-disable.c +0 -151
  397. package/deps/liburing/liburing/test/eventfd-ring.c +0 -97
  398. package/deps/liburing/liburing/test/eventfd.c +0 -112
  399. package/deps/liburing/liburing/test/fadvise.c +0 -202
  400. package/deps/liburing/liburing/test/fallocate.c +0 -249
  401. package/deps/liburing/liburing/test/fc2a85cb02ef-test.c +0 -138
  402. package/deps/liburing/liburing/test/file-register.c +0 -843
  403. package/deps/liburing/liburing/test/file-update.c +0 -173
  404. package/deps/liburing/liburing/test/files-exit-hang-poll.c +0 -128
  405. package/deps/liburing/liburing/test/files-exit-hang-timeout.c +0 -134
  406. package/deps/liburing/liburing/test/fixed-link.c +0 -90
  407. package/deps/liburing/liburing/test/fsync.c +0 -224
  408. package/deps/liburing/liburing/test/hardlink.c +0 -136
  409. package/deps/liburing/liburing/test/helpers.c +0 -135
  410. package/deps/liburing/liburing/test/helpers.h +0 -67
  411. package/deps/liburing/liburing/test/io-cancel.c +0 -537
  412. package/deps/liburing/liburing/test/io_uring_enter.c +0 -296
  413. package/deps/liburing/liburing/test/io_uring_register.c +0 -664
  414. package/deps/liburing/liburing/test/io_uring_setup.c +0 -192
  415. package/deps/liburing/liburing/test/iopoll.c +0 -366
  416. package/deps/liburing/liburing/test/lfs-openat-write.c +0 -117
  417. package/deps/liburing/liburing/test/lfs-openat.c +0 -273
  418. package/deps/liburing/liburing/test/link-timeout.c +0 -1107
  419. package/deps/liburing/liburing/test/link.c +0 -496
  420. package/deps/liburing/liburing/test/link_drain.c +0 -229
  421. package/deps/liburing/liburing/test/madvise.c +0 -195
  422. package/deps/liburing/liburing/test/mkdir.c +0 -108
  423. package/deps/liburing/liburing/test/multicqes_drain.c +0 -383
  424. package/deps/liburing/liburing/test/nop-all-sizes.c +0 -107
  425. package/deps/liburing/liburing/test/nop.c +0 -115
  426. package/deps/liburing/liburing/test/open-close.c +0 -146
  427. package/deps/liburing/liburing/test/openat2.c +0 -240
  428. package/deps/liburing/liburing/test/personality.c +0 -204
  429. package/deps/liburing/liburing/test/pipe-eof.c +0 -81
  430. package/deps/liburing/liburing/test/pipe-reuse.c +0 -105
  431. package/deps/liburing/liburing/test/poll-cancel-ton.c +0 -139
  432. package/deps/liburing/liburing/test/poll-cancel.c +0 -135
  433. package/deps/liburing/liburing/test/poll-link.c +0 -227
  434. package/deps/liburing/liburing/test/poll-many.c +0 -208
  435. package/deps/liburing/liburing/test/poll-mshot-update.c +0 -273
  436. package/deps/liburing/liburing/test/poll-ring.c +0 -48
  437. package/deps/liburing/liburing/test/poll-v-poll.c +0 -353
  438. package/deps/liburing/liburing/test/poll.c +0 -109
  439. package/deps/liburing/liburing/test/probe.c +0 -137
  440. package/deps/liburing/liburing/test/read-write.c +0 -876
  441. package/deps/liburing/liburing/test/register-restrictions.c +0 -633
  442. package/deps/liburing/liburing/test/rename.c +0 -134
  443. package/deps/liburing/liburing/test/ring-leak.c +0 -173
  444. package/deps/liburing/liburing/test/ring-leak2.c +0 -249
  445. package/deps/liburing/liburing/test/rsrc_tags.c +0 -449
  446. package/deps/liburing/liburing/test/runtests-loop.sh +0 -16
  447. package/deps/liburing/liburing/test/runtests.sh +0 -170
  448. package/deps/liburing/liburing/test/rw_merge_test.c +0 -97
  449. package/deps/liburing/liburing/test/self.c +0 -91
  450. package/deps/liburing/liburing/test/send_recv.c +0 -291
  451. package/deps/liburing/liburing/test/send_recvmsg.c +0 -345
  452. package/deps/liburing/liburing/test/sendmsg_fs_cve.c +0 -198
  453. package/deps/liburing/liburing/test/shared-wq.c +0 -84
  454. package/deps/liburing/liburing/test/short-read.c +0 -75
  455. package/deps/liburing/liburing/test/shutdown.c +0 -163
  456. package/deps/liburing/liburing/test/sigfd-deadlock.c +0 -74
  457. package/deps/liburing/liburing/test/socket-rw-eagain.c +0 -156
  458. package/deps/liburing/liburing/test/socket-rw.c +0 -147
  459. package/deps/liburing/liburing/test/splice.c +0 -511
  460. package/deps/liburing/liburing/test/sq-full-cpp.cc +0 -45
  461. package/deps/liburing/liburing/test/sq-full.c +0 -45
  462. package/deps/liburing/liburing/test/sq-poll-dup.c +0 -200
  463. package/deps/liburing/liburing/test/sq-poll-kthread.c +0 -168
  464. package/deps/liburing/liburing/test/sq-poll-share.c +0 -137
  465. package/deps/liburing/liburing/test/sq-space_left.c +0 -159
  466. package/deps/liburing/liburing/test/sqpoll-cancel-hang.c +0 -159
  467. package/deps/liburing/liburing/test/sqpoll-disable-exit.c +0 -195
  468. package/deps/liburing/liburing/test/sqpoll-exit-hang.c +0 -77
  469. package/deps/liburing/liburing/test/sqpoll-sleep.c +0 -68
  470. package/deps/liburing/liburing/test/statx.c +0 -172
  471. package/deps/liburing/liburing/test/stdout.c +0 -232
  472. package/deps/liburing/liburing/test/submit-link-fail.c +0 -154
  473. package/deps/liburing/liburing/test/submit-reuse.c +0 -239
  474. package/deps/liburing/liburing/test/symlink.c +0 -116
  475. package/deps/liburing/liburing/test/teardowns.c +0 -58
  476. package/deps/liburing/liburing/test/thread-exit.c +0 -131
  477. package/deps/liburing/liburing/test/timeout-new.c +0 -246
  478. package/deps/liburing/liburing/test/timeout-overflow.c +0 -204
  479. package/deps/liburing/liburing/test/timeout.c +0 -1354
  480. package/deps/liburing/liburing/test/unlink.c +0 -111
  481. package/deps/liburing/liburing/test/wakeup-hang.c +0 -162
  482. package/deps/rocksdb/rocksdb/README.md +0 -32
  483. package/deps/rocksdb/rocksdb/microbench/README.md +0 -60
  484. package/deps/rocksdb/rocksdb/plugin/README.md +0 -43
  485. package/deps/rocksdb/rocksdb/port/README +0 -10
  486. package/deps/rocksdb/rocksdb/python.mk +0 -9
  487. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/README +0 -13
  488. package/prebuilds/linux-arm64/node.napi.node +0 -0
@@ -1,111 +0,0 @@
1
- /* SPDX-License-Identifier: MIT */
2
- /*
3
- * Description: run various nop tests
4
- *
5
- */
6
- #include <errno.h>
7
- #include <stdio.h>
8
- #include <unistd.h>
9
- #include <stdlib.h>
10
- #include <string.h>
11
- #include <fcntl.h>
12
-
13
- #include "liburing.h"
14
-
15
- static int test_unlink(struct io_uring *ring, const char *old)
16
- {
17
- struct io_uring_cqe *cqe;
18
- struct io_uring_sqe *sqe;
19
- int ret;
20
-
21
- sqe = io_uring_get_sqe(ring);
22
- if (!sqe) {
23
- fprintf(stderr, "get sqe failed\n");
24
- goto err;
25
- }
26
- io_uring_prep_unlinkat(sqe, AT_FDCWD, old, 0);
27
-
28
- ret = io_uring_submit(ring);
29
- if (ret <= 0) {
30
- fprintf(stderr, "sqe submit failed: %d\n", ret);
31
- goto err;
32
- }
33
-
34
- ret = io_uring_wait_cqe(ring, &cqe);
35
- if (ret < 0) {
36
- fprintf(stderr, "wait completion %d\n", ret);
37
- goto err;
38
- }
39
- ret = cqe->res;
40
- io_uring_cqe_seen(ring, cqe);
41
- return ret;
42
- err:
43
- return 1;
44
- }
45
-
46
- static int stat_file(const char *buf)
47
- {
48
- struct stat sb;
49
-
50
- if (!stat(buf, &sb))
51
- return 0;
52
-
53
- return errno;
54
- }
55
-
56
- int main(int argc, char *argv[])
57
- {
58
- struct io_uring ring;
59
- char buf[32] = "./XXXXXX";
60
- int ret;
61
-
62
- if (argc > 1)
63
- return 0;
64
-
65
- ret = io_uring_queue_init(1, &ring, 0);
66
- if (ret) {
67
- fprintf(stderr, "ring setup failed: %d\n", ret);
68
- return 1;
69
- }
70
-
71
- ret = mkstemp(buf);
72
- if (ret < 0) {
73
- perror("mkstemp");
74
- return 1;
75
- }
76
- close(ret);
77
-
78
- if (stat_file(buf) != 0) {
79
- perror("stat");
80
- return 1;
81
- }
82
-
83
- ret = test_unlink(&ring, buf);
84
- if (ret < 0) {
85
- if (ret == -EBADF || ret == -EINVAL) {
86
- fprintf(stdout, "Unlink not supported, skipping\n");
87
- unlink(buf);
88
- return 0;
89
- }
90
- fprintf(stderr, "rename: %s\n", strerror(-ret));
91
- goto err;
92
- } else if (ret)
93
- goto err;
94
-
95
- ret = stat_file(buf);
96
- if (ret != ENOENT) {
97
- fprintf(stderr, "stat got %s\n", strerror(ret));
98
- return 1;
99
- }
100
-
101
- ret = test_unlink(&ring, "/3/2/3/1/z/y");
102
- if (ret != -ENOENT) {
103
- fprintf(stderr, "invalid unlink got %s\n", strerror(-ret));
104
- return 1;
105
- }
106
-
107
- return 0;
108
- err:
109
- unlink(buf);
110
- return 1;
111
- }
@@ -1,162 +0,0 @@
1
- /* SPDX-License-Identifier: MIT */
2
- #include <sys/eventfd.h>
3
- #include <unistd.h>
4
- #include <stdio.h>
5
- #include <stdlib.h>
6
- #include <string.h>
7
- #include <pthread.h>
8
- #include <liburing.h>
9
- #include <fcntl.h>
10
- #include <poll.h>
11
- #include <sys/time.h>
12
-
13
- struct thread_data {
14
- struct io_uring *ring;
15
- int write_fd;
16
- };
17
-
18
- static void error_exit(char *message)
19
- {
20
- perror(message);
21
- exit(1);
22
- }
23
-
24
- static void *listener_thread(void *data)
25
- {
26
- struct thread_data *td = data;
27
- struct io_uring_cqe *cqe;
28
- int ret;
29
-
30
- ret = io_uring_wait_cqe(td->ring, &cqe);
31
- if (ret < 0) {
32
- fprintf(stderr, "Error waiting for completion: %s\n",
33
- strerror(-ret));
34
- goto err;
35
- }
36
- if (cqe->res < 0) {
37
- fprintf(stderr, "Error in async operation: %s\n", strerror(-cqe->res));
38
- goto err;
39
- }
40
- io_uring_cqe_seen(td->ring, cqe);
41
- return NULL;
42
- err:
43
- return (void *) 1;
44
- }
45
-
46
- static void *wakeup_io_uring(void *data)
47
- {
48
- struct thread_data *td = data;
49
- int res;
50
-
51
- res = eventfd_write(td->write_fd, (eventfd_t) 1L);
52
- if (res < 0) {
53
- perror("eventfd_write");
54
- return (void *) 1;
55
- }
56
- return NULL;
57
- }
58
-
59
- static int test_pipes(void)
60
- {
61
- struct io_uring_sqe *sqe;
62
- struct thread_data td;
63
- struct io_uring ring;
64
- pthread_t t1, t2;
65
- int ret, fds[2];
66
- void *pret;
67
-
68
- if (pipe(fds) < 0)
69
- error_exit("eventfd");
70
-
71
- ret = io_uring_queue_init(8, &ring, 0);
72
- if (ret) {
73
- fprintf(stderr, "Unable to setup io_uring: %s\n", strerror(-ret));
74
- return 1;
75
- }
76
-
77
- td.write_fd = fds[1];
78
- td.ring = &ring;
79
-
80
- sqe = io_uring_get_sqe(&ring);
81
- io_uring_prep_poll_add(sqe, fds[0], POLLIN);
82
- sqe->user_data = 2;
83
- ret = io_uring_submit(&ring);
84
- if (ret != 1) {
85
- fprintf(stderr, "ring_submit=%d\n", ret);
86
- return 1;
87
- }
88
-
89
- pthread_create(&t1, NULL, listener_thread, &td);
90
-
91
- sleep(1);
92
-
93
- pthread_create(&t2, NULL, wakeup_io_uring, &td);
94
- pthread_join(t1, &pret);
95
-
96
- io_uring_queue_exit(&ring);
97
- return pret != NULL;
98
- }
99
-
100
- static int test_eventfd(void)
101
- {
102
- struct io_uring_sqe *sqe;
103
- struct thread_data td;
104
- struct io_uring ring;
105
- pthread_t t1, t2;
106
- int efd, ret;
107
- void *pret;
108
-
109
- efd = eventfd(0, 0);
110
- if (efd < 0)
111
- error_exit("eventfd");
112
-
113
- ret = io_uring_queue_init(8, &ring, 0);
114
- if (ret) {
115
- fprintf(stderr, "Unable to setup io_uring: %s\n", strerror(-ret));
116
- return 1;
117
- }
118
-
119
- td.write_fd = efd;
120
- td.ring = &ring;
121
-
122
- sqe = io_uring_get_sqe(&ring);
123
- io_uring_prep_poll_add(sqe, efd, POLLIN);
124
- sqe->user_data = 2;
125
- ret = io_uring_submit(&ring);
126
- if (ret != 1) {
127
- fprintf(stderr, "ring_submit=%d\n", ret);
128
- return 1;
129
- }
130
-
131
- pthread_create(&t1, NULL, listener_thread, &td);
132
-
133
- sleep(1);
134
-
135
- pthread_create(&t2, NULL, wakeup_io_uring, &td);
136
- pthread_join(t1, &pret);
137
-
138
- io_uring_queue_exit(&ring);
139
- return pret != NULL;
140
- }
141
-
142
- int main(int argc, char *argv[])
143
- {
144
- int ret;
145
-
146
- if (argc > 1)
147
- return 0;
148
-
149
- ret = test_pipes();
150
- if (ret) {
151
- fprintf(stderr, "test_pipe failed\n");
152
- return ret;
153
- }
154
-
155
- ret = test_eventfd();
156
- if (ret) {
157
- fprintf(stderr, "test_eventfd failed\n");
158
- return ret;
159
- }
160
-
161
- return 0;
162
- }
@@ -1,32 +0,0 @@
1
- ## RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
2
-
3
- [![CircleCI Status](https://circleci.com/gh/facebook/rocksdb.svg?style=svg)](https://circleci.com/gh/facebook/rocksdb)
4
- [![TravisCI Status](https://api.travis-ci.com/facebook/rocksdb.svg?branch=main)](https://travis-ci.com/github/facebook/rocksdb)
5
- [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/fbgfu0so3afcno78/branch/main?svg=true)](https://ci.appveyor.com/project/Facebook/rocksdb/branch/main)
6
- [![PPC64le Build Status](http://140-211-168-68-openstack.osuosl.org:8080/buildStatus/icon?job=rocksdb&style=plastic)](http://140-211-168-68-openstack.osuosl.org:8080/job/rocksdb)
7
-
8
- RocksDB is developed and maintained by Facebook Database Engineering Team.
9
- It is built on earlier work on [LevelDB](https://github.com/google/leveldb) by Sanjay Ghemawat (sanjay@google.com)
10
- and Jeff Dean (jeff@google.com)
11
-
12
- This code is a library that forms the core building block for a fast
13
- key-value server, especially suited for storing data on flash drives.
14
- It has a Log-Structured-Merge-Database (LSM) design with flexible tradeoffs
15
- between Write-Amplification-Factor (WAF), Read-Amplification-Factor (RAF)
16
- and Space-Amplification-Factor (SAF). It has multi-threaded compactions,
17
- making it especially suitable for storing multiple terabytes of data in a
18
- single database.
19
-
20
- Start with example usage here: https://github.com/facebook/rocksdb/tree/main/examples
21
-
22
- See the [github wiki](https://github.com/facebook/rocksdb/wiki) for more explanation.
23
-
24
- The public interface is in `include/`. Callers should not include or
25
- rely on the details of any other header files in this package. Those
26
- internal APIs may be changed without warning.
27
-
28
- Questions and discussions are welcome on the [RocksDB Developers Public](https://www.facebook.com/groups/rocksdb.dev/) Facebook group and [email list](https://groups.google.com/g/rocksdb) on Google Groups.
29
-
30
- ## License
31
-
32
- RocksDB is dual-licensed under both the GPLv2 (found in the COPYING file in the root directory) and Apache 2.0 License (found in the LICENSE.Apache file in the root directory). You may select, at your option, one of the above-listed licenses.
@@ -1,60 +0,0 @@
1
- # RocksDB Micro-Benchmark
2
-
3
- ## Overview
4
-
5
- RocksDB micro-benchmark is a set of tests for benchmarking a single component or simple DB operations. The test artificially generates input data and executes the same operation with it to collect and report performance metrics. As it's focusing on testing a single, well-defined operation, the result is more precise and reproducible, which also has its limitation of not representing a real production use case. The test author needs to carefully design the microbench to represent its true purpose.
6
-
7
- The tests are based on [Google Benchmark](https://github.com/google/benchmark) library, which provides a standard framework for writing benchmarks.
8
-
9
- ## How to Run
10
- ### Prerequisite
11
- Install the [Google Benchmark](https://github.com/google/benchmark) version `1.6.0` or above.
12
-
13
- *Note: Google Benchmark `1.6.x` is incompatible with previous versions like `1.5.x`, please make sure you're using the newer version.*
14
-
15
- ### Build and Run
16
- With `Makefile`:
17
- ```bash
18
- $ DEBUG_LEVEL=0 make run_microbench
19
- ```
20
- Or with cmake:
21
- ```bash
22
- $ mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_BENCHMARK
23
- $ make run_microbench
24
- ```
25
-
26
- *Note: Please run the benchmark code in release build.*
27
- ### Run Single Test
28
- Example:
29
- ```bash
30
- $ make db_basic_bench
31
- $ ./db_basic_bench --benchmark_filter=<TEST_NAME>
32
- ```
33
-
34
- ## Best Practices
35
- #### * Use the Same Test Directory Setting as Unittest
36
- Most of the Micro-benchmark tests use the same test directory setup as unittest, so it could be overridden by:
37
- ```bash
38
- $ TEST_TMPDIR=/mydata/tmp/ ./db_basic_bench --benchmark_filter=<TEST_NAME>
39
- ```
40
- Please also follow that when designing new tests.
41
-
42
- #### * Avoid Using Debug API
43
- Even though micro-benchmark is a test, avoid using internal Debug API like TEST_WaitForRun() which is designed for unittest. As benchmark tests are designed for release build, don't use any of that.
44
-
45
- #### * Pay Attention to Local Optimization
46
- As a micro-benchmark is focusing on a single component or area, make sure it is a key part for impacting the overall application performance.
47
-
48
- The compiler might be able to optimize the code that not the same way as the whole application, and if the test data input is simple and small, it may be able to all cached in CPU memory, which is leading to a wrong metric. Take these into consideration when designing the tests.
49
-
50
- #### * Names of user-defined counters/metrics has to be `[A-Za-z0-9_]`
51
- It's a restriction of the metrics collecting and reporting system RocksDB is using internally. It will also help integrate with more systems.
52
-
53
- #### * Minimize the Metrics Variation
54
- Try reducing the test result variation, one way to check that is running the test multiple times and check the CV (Coefficient of Variation) reported by gbenchmark.
55
- ```bash
56
- $ ./db_basic_bench --benchmark_filter=<TEST_NAME> --benchmark_repetitions=10
57
- ...
58
- <TEST_NAME>_cv 3.2%
59
- ```
60
- RocksDB has background compaction jobs which may cause the test result to vary a lot. If the micro-benchmark is not purposely testing the operation while compaction is in progress, it should wait for the compaction to finish (`db_impl->WaitForCompact()`) or disable auto-compaction.
@@ -1,43 +0,0 @@
1
- ## Building external plugins together with RocksDB
2
-
3
- RocksDB offers several plugin interfaces for developers to customize its behavior. One difficulty developers face is how to make their plugin available to end users. The approach discussed here involves building the external code together with the RocksDB code into a single binary. Note another approach we plan to support involves loading plugins dynamically from shared libraries.
4
-
5
- ### Discovery
6
-
7
- We hope developers will mention their work in "PLUGINS.md" so users can easily discover and reuse solutions for customizing RocksDB.
8
-
9
- ### Directory organization
10
-
11
- External plugins will be linked according to their name into a subdirectory of "plugin/". For example, a plugin called "dedupfs" would be linked into "plugin/dedupfs/".
12
-
13
- ### Build standard
14
-
15
- Currently the only supported build system are make and cmake.
16
-
17
- For make, files in the plugin directory ending in the .mk extension can define the following variables.
18
-
19
- * `$(PLUGIN_NAME)_SOURCES`: these files will be compiled and linked with RocksDB. They can access RocksDB public header files.
20
- * `$(PLUGIN_NAME)_HEADERS`: these files will be installed in the RocksDB header directory. Their paths will be prefixed by "rocksdb/plugin/$(PLUGIN_NAME)/".
21
- * `$(PLUGIN_NAME)_LDFLAGS`: these flags will be passed to the final link step. For example, library dependencies can be propagated here, or symbols can be forcibly included, e.g., for static registration.
22
- * `$(PLUGIN_NAME)_CXXFLAGS`: these flags will be passed to the compiler. For example, they can specify locations of header files in non-standard locations.
23
-
24
- Users will run the usual make commands from the RocksDB directory, specifying the plugins to include in a space-separated list in the variable `ROCKSDB_PLUGINS`.
25
-
26
- For CMake, the CMakeLists.txt file in the plugin directory can define the following variables.
27
-
28
- * `${PLUGIN_NAME}_SOURCES`: these files will be compiled and linked with RocksDB. They can access RocksDB public header files.
29
- * `${PLUGIN_NAME}_COMPILE_FLAGS`: these flags will be passed to the compiler. For example, they can specify locations of header files in non-standard locations.
30
- * `${PLUGIN_NAME}_INCLUDE_PATHS`: paths to directories to search for plugin-specific header files during compilation.
31
- * `${PLUGIN_NAME}_LIBS`: list of library names required to build the plugin, e.g. `dl`, `java`, `jvm`, `rados`, etc. CMake will generate proper flags for linking.
32
- * `${PLUGIN_NAME}_LINK_PATHS`: list of paths for the linker to search for required libraries in additional to standard locations.
33
- * `${PLUGIN_NAME}_CMAKE_SHARED_LINKER_FLAGS` additional linker flags used to generate shared libraries. For example, symbols can be forcibly included, e.g., for static registration.
34
- * `${PLUGIN_NAME}_CMAKE_EXE_LINKER_FLAGS`: additional linker flags used to generate executables. For example, symbols can be forcibly included, e.g., for static registration.
35
-
36
- Users will run the usual cmake commands, specifying the plugins to include in a space-separated list in the command line variable `ROCKSDB_PLUGINS` when invoking cmake.
37
- ```
38
- cmake .. -DROCKSDB_PLUGINS="dedupfs hdfs rados"
39
- ```
40
-
41
- ### Example
42
-
43
- For a working example, see [Dedupfs](https://github.com/ajkr/dedupfs).
@@ -1,10 +0,0 @@
1
- This directory contains interfaces and implementations that isolate the
2
- rest of the package from platform details.
3
-
4
- Code in the rest of the package includes "port.h" from this directory.
5
- "port.h" in turn includes a platform specific "port_<platform>.h" file
6
- that provides the platform specific implementation.
7
-
8
- See port_posix.h for an example of what must be provided in a platform
9
- specific header file.
10
-
@@ -1,9 +0,0 @@
1
- ifndef PYTHON
2
-
3
- # Default to python3. Some distros like CentOS 8 do not have `python`.
4
- ifeq ($(origin PYTHON), undefined)
5
- PYTHON := $(shell which python3 || which python || echo python3)
6
- endif
7
- export PYTHON
8
-
9
- endif
@@ -1,13 +0,0 @@
1
- The files in this directory originally come from
2
- https://github.com/percona/PerconaFT/.
3
-
4
- This directory only includes the "locktree" part of PerconaFT, and its
5
- dependencies.
6
-
7
- The following modifications were made:
8
- - Make locktree usable outside of PerconaFT library
9
- - Add shared read-only lock support
10
-
11
- The files named *_subst.* are substitutes of the PerconaFT's files, they
12
- contain replacements of PerconaFT's functionality.
13
-