@nxtedition/rocksdb 13.5.8 → 13.5.9

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 (508) hide show
  1. package/binding.cc +209 -2
  2. package/deps/rocksdb/rocksdb/BUCK +12 -0
  3. package/deps/rocksdb/rocksdb/CMakeLists.txt +7 -0
  4. package/deps/rocksdb/rocksdb/Makefile +28 -23
  5. package/deps/rocksdb/rocksdb/cache/cache.cc +0 -1
  6. package/deps/rocksdb/rocksdb/cache/cache_bench_tool.cc +1 -2
  7. package/deps/rocksdb/rocksdb/cache/compressed_secondary_cache.cc +43 -39
  8. package/deps/rocksdb/rocksdb/cache/compressed_secondary_cache.h +2 -0
  9. package/deps/rocksdb/rocksdb/cache/compressed_secondary_cache_test.cc +0 -1
  10. package/deps/rocksdb/rocksdb/cache/lru_cache.cc +2 -3
  11. package/deps/rocksdb/rocksdb/cache/lru_cache_test.cc +2 -2
  12. package/deps/rocksdb/rocksdb/cache/secondary_cache.cc +1 -3
  13. package/deps/rocksdb/rocksdb/cache/secondary_cache_adapter.cc +11 -1
  14. package/deps/rocksdb/rocksdb/cache/tiered_secondary_cache_test.cc +13 -5
  15. package/deps/rocksdb/rocksdb/crash_test.mk +61 -15
  16. package/deps/rocksdb/rocksdb/db/arena_wrapped_db_iter.cc +136 -45
  17. package/deps/rocksdb/rocksdb/db/arena_wrapped_db_iter.h +34 -16
  18. package/deps/rocksdb/rocksdb/db/blob/blob_file_builder.cc +10 -7
  19. package/deps/rocksdb/rocksdb/db/blob/blob_file_builder_test.cc +1 -2
  20. package/deps/rocksdb/rocksdb/db/blob/blob_file_meta.h +1 -0
  21. package/deps/rocksdb/rocksdb/db/blob/blob_file_reader.cc +12 -9
  22. package/deps/rocksdb/rocksdb/db/blob/blob_file_reader_test.cc +3 -4
  23. package/deps/rocksdb/rocksdb/db/blob/blob_source.cc +2 -2
  24. package/deps/rocksdb/rocksdb/db/blob/blob_source_test.cc +3 -4
  25. package/deps/rocksdb/rocksdb/db/builder.cc +22 -8
  26. package/deps/rocksdb/rocksdb/db/builder.h +5 -4
  27. package/deps/rocksdb/rocksdb/db/c.cc +556 -15
  28. package/deps/rocksdb/rocksdb/db/c_test.c +133 -12
  29. package/deps/rocksdb/rocksdb/db/column_family.cc +114 -50
  30. package/deps/rocksdb/rocksdb/db/column_family.h +53 -36
  31. package/deps/rocksdb/rocksdb/db/column_family_test.cc +6 -6
  32. package/deps/rocksdb/rocksdb/db/compact_files_test.cc +0 -1
  33. package/deps/rocksdb/rocksdb/db/compaction/compaction.cc +95 -70
  34. package/deps/rocksdb/rocksdb/db/compaction/compaction.h +71 -51
  35. package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator.cc +7 -86
  36. package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator.h +26 -68
  37. package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator_test.cc +0 -122
  38. package/deps/rocksdb/rocksdb/db/compaction/compaction_job.cc +453 -258
  39. package/deps/rocksdb/rocksdb/db/compaction/compaction_job.h +117 -92
  40. package/deps/rocksdb/rocksdb/db/compaction/compaction_job_stats_test.cc +0 -1
  41. package/deps/rocksdb/rocksdb/db/compaction/compaction_job_test.cc +38 -38
  42. package/deps/rocksdb/rocksdb/db/compaction/compaction_outputs.cc +24 -17
  43. package/deps/rocksdb/rocksdb/db/compaction/compaction_outputs.h +34 -45
  44. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker.cc +32 -31
  45. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker.h +12 -3
  46. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_fifo.cc +1 -1
  47. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_fifo.h +2 -1
  48. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_level.cc +10 -10
  49. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_level.h +2 -1
  50. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_test.cc +82 -34
  51. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_universal.cc +267 -179
  52. package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_universal.h +4 -1
  53. package/deps/rocksdb/rocksdb/db/compaction/compaction_service_job.cc +273 -89
  54. package/deps/rocksdb/rocksdb/db/compaction/compaction_service_test.cc +300 -14
  55. package/deps/rocksdb/rocksdb/db/compaction/compaction_state.cc +4 -4
  56. package/deps/rocksdb/rocksdb/db/compaction/compaction_state.h +2 -2
  57. package/deps/rocksdb/rocksdb/db/compaction/subcompaction_state.cc +28 -23
  58. package/deps/rocksdb/rocksdb/db/compaction/subcompaction_state.h +69 -51
  59. package/deps/rocksdb/rocksdb/db/compaction/tiered_compaction_test.cc +522 -245
  60. package/deps/rocksdb/rocksdb/db/convenience.cc +15 -4
  61. package/deps/rocksdb/rocksdb/db/corruption_test.cc +1 -3
  62. package/deps/rocksdb/rocksdb/db/cuckoo_table_db_test.cc +0 -2
  63. package/deps/rocksdb/rocksdb/db/db_basic_test.cc +196 -17
  64. package/deps/rocksdb/rocksdb/db/db_block_cache_test.cc +74 -62
  65. package/deps/rocksdb/rocksdb/db/db_bloom_filter_test.cc +48 -0
  66. package/deps/rocksdb/rocksdb/db/db_compaction_test.cc +682 -250
  67. package/deps/rocksdb/rocksdb/db/db_dynamic_level_test.cc +0 -1
  68. package/deps/rocksdb/rocksdb/db/db_encryption_test.cc +3 -4
  69. package/deps/rocksdb/rocksdb/db/db_filesnapshot.cc +11 -16
  70. package/deps/rocksdb/rocksdb/db/db_flush_test.cc +57 -0
  71. package/deps/rocksdb/rocksdb/db/db_impl/compacted_db_impl.cc +2 -2
  72. package/deps/rocksdb/rocksdb/db/db_impl/compacted_db_impl.h +1 -1
  73. package/deps/rocksdb/rocksdb/db/db_impl/db_impl.cc +540 -490
  74. package/deps/rocksdb/rocksdb/db/db_impl/db_impl.h +347 -188
  75. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc +584 -217
  76. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_debug.cc +13 -9
  77. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_experimental.cc +5 -7
  78. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_files.cc +40 -36
  79. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_follower.cc +1 -3
  80. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_open.cc +751 -372
  81. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_readonly.cc +35 -32
  82. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_readonly.h +24 -2
  83. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_secondary.cc +125 -63
  84. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_secondary.h +2 -2
  85. package/deps/rocksdb/rocksdb/db/db_impl/db_impl_write.cc +311 -196
  86. package/deps/rocksdb/rocksdb/db/db_io_failure_test.cc +15 -5
  87. package/deps/rocksdb/rocksdb/db/db_iter.cc +42 -29
  88. package/deps/rocksdb/rocksdb/db/db_iter.h +96 -31
  89. package/deps/rocksdb/rocksdb/db/db_iter_stress_test.cc +3 -4
  90. package/deps/rocksdb/rocksdb/db/db_iter_test.cc +168 -228
  91. package/deps/rocksdb/rocksdb/db/db_iterator_test.cc +454 -0
  92. package/deps/rocksdb/rocksdb/db/db_kv_checksum_test.cc +8 -8
  93. package/deps/rocksdb/rocksdb/db/db_log_iter_test.cc +0 -1
  94. package/deps/rocksdb/rocksdb/db/db_memtable_test.cc +90 -0
  95. package/deps/rocksdb/rocksdb/db/db_merge_operand_test.cc +60 -2
  96. package/deps/rocksdb/rocksdb/db/db_merge_operator_test.cc +7 -3
  97. package/deps/rocksdb/rocksdb/db/db_options_test.cc +85 -27
  98. package/deps/rocksdb/rocksdb/db/db_properties_test.cc +3 -1
  99. package/deps/rocksdb/rocksdb/db/db_rate_limiter_test.cc +0 -2
  100. package/deps/rocksdb/rocksdb/db/db_secondary_test.cc +114 -2
  101. package/deps/rocksdb/rocksdb/db/db_sst_test.cc +0 -1
  102. package/deps/rocksdb/rocksdb/db/db_statistics_test.cc +0 -1
  103. package/deps/rocksdb/rocksdb/db/db_table_properties_test.cc +51 -3
  104. package/deps/rocksdb/rocksdb/db/db_tailing_iter_test.cc +0 -1
  105. package/deps/rocksdb/rocksdb/db/db_test.cc +325 -18
  106. package/deps/rocksdb/rocksdb/db/db_test2.cc +644 -20
  107. package/deps/rocksdb/rocksdb/db/db_test_util.cc +14 -6
  108. package/deps/rocksdb/rocksdb/db/db_test_util.h +9 -0
  109. package/deps/rocksdb/rocksdb/db/db_universal_compaction_test.cc +64 -45
  110. package/deps/rocksdb/rocksdb/db/db_wal_test.cc +203 -14
  111. package/deps/rocksdb/rocksdb/db/db_with_timestamp_basic_test.cc +259 -30
  112. package/deps/rocksdb/rocksdb/db/db_write_buffer_manager_test.cc +0 -1
  113. package/deps/rocksdb/rocksdb/db/db_write_test.cc +75 -1
  114. package/deps/rocksdb/rocksdb/db/dbformat.h +70 -6
  115. package/deps/rocksdb/rocksdb/db/deletefile_test.cc +0 -190
  116. package/deps/rocksdb/rocksdb/db/error_handler.cc +22 -7
  117. package/deps/rocksdb/rocksdb/db/error_handler.h +16 -1
  118. package/deps/rocksdb/rocksdb/db/event_helpers.cc +41 -26
  119. package/deps/rocksdb/rocksdb/db/experimental.cc +4 -3
  120. package/deps/rocksdb/rocksdb/db/external_sst_file_basic_test.cc +464 -78
  121. package/deps/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc +166 -69
  122. package/deps/rocksdb/rocksdb/db/external_sst_file_ingestion_job.h +54 -25
  123. package/deps/rocksdb/rocksdb/db/external_sst_file_test.cc +1 -3
  124. package/deps/rocksdb/rocksdb/db/flush_job.cc +98 -81
  125. package/deps/rocksdb/rocksdb/db/flush_job.h +4 -9
  126. package/deps/rocksdb/rocksdb/db/flush_job_test.cc +80 -84
  127. package/deps/rocksdb/rocksdb/db/forward_iterator.cc +1 -1
  128. package/deps/rocksdb/rocksdb/db/forward_iterator.h +2 -2
  129. package/deps/rocksdb/rocksdb/db/import_column_family_job.cc +12 -19
  130. package/deps/rocksdb/rocksdb/db/import_column_family_test.cc +0 -2
  131. package/deps/rocksdb/rocksdb/db/internal_stats.cc +41 -15
  132. package/deps/rocksdb/rocksdb/db/internal_stats.h +63 -52
  133. package/deps/rocksdb/rocksdb/db/job_context.h +59 -24
  134. package/deps/rocksdb/rocksdb/db/listener_test.cc +69 -10
  135. package/deps/rocksdb/rocksdb/db/log_format.h +11 -2
  136. package/deps/rocksdb/rocksdb/db/log_reader.cc +147 -34
  137. package/deps/rocksdb/rocksdb/db/log_reader.h +40 -11
  138. package/deps/rocksdb/rocksdb/db/log_test.cc +16 -3
  139. package/deps/rocksdb/rocksdb/db/log_writer.cc +102 -55
  140. package/deps/rocksdb/rocksdb/db/log_writer.h +21 -2
  141. package/deps/rocksdb/rocksdb/db/malloc_stats.h +0 -2
  142. package/deps/rocksdb/rocksdb/db/memtable.cc +16 -47
  143. package/deps/rocksdb/rocksdb/db/memtable.h +76 -12
  144. package/deps/rocksdb/rocksdb/db/memtable_list.cc +23 -20
  145. package/deps/rocksdb/rocksdb/db/memtable_list.h +9 -11
  146. package/deps/rocksdb/rocksdb/db/memtable_list_test.cc +18 -37
  147. package/deps/rocksdb/rocksdb/db/merge_context.h +2 -1
  148. package/deps/rocksdb/rocksdb/db/merge_test.cc +8 -0
  149. package/deps/rocksdb/rocksdb/db/obsolete_files_test.cc +3 -5
  150. package/deps/rocksdb/rocksdb/db/periodic_task_scheduler.cc +15 -7
  151. package/deps/rocksdb/rocksdb/db/periodic_task_scheduler.h +6 -3
  152. package/deps/rocksdb/rocksdb/db/periodic_task_scheduler_test.cc +22 -4
  153. package/deps/rocksdb/rocksdb/db/plain_table_db_test.cc +41 -1
  154. package/deps/rocksdb/rocksdb/db/prefix_test.cc +0 -1
  155. package/deps/rocksdb/rocksdb/db/repair.cc +29 -34
  156. package/deps/rocksdb/rocksdb/db/repair_test.cc +0 -1
  157. package/deps/rocksdb/rocksdb/db/seqno_time_test.cc +14 -15
  158. package/deps/rocksdb/rocksdb/db/seqno_to_time_mapping.cc +1 -3
  159. package/deps/rocksdb/rocksdb/db/seqno_to_time_mapping.h +47 -1
  160. package/deps/rocksdb/rocksdb/db/table_cache.cc +3 -3
  161. package/deps/rocksdb/rocksdb/db/transaction_log_impl.cc +1 -3
  162. package/deps/rocksdb/rocksdb/db/transaction_log_impl.h +2 -1
  163. package/deps/rocksdb/rocksdb/db/version_builder.cc +2 -2
  164. package/deps/rocksdb/rocksdb/db/version_edit.cc +8 -37
  165. package/deps/rocksdb/rocksdb/db/version_edit.h +32 -1
  166. package/deps/rocksdb/rocksdb/db/version_edit_handler.cc +26 -18
  167. package/deps/rocksdb/rocksdb/db/version_edit_handler.h +7 -5
  168. package/deps/rocksdb/rocksdb/db/version_set.cc +282 -197
  169. package/deps/rocksdb/rocksdb/db/version_set.h +54 -57
  170. package/deps/rocksdb/rocksdb/db/version_set_test.cc +28 -35
  171. package/deps/rocksdb/rocksdb/db/version_util.h +2 -3
  172. package/deps/rocksdb/rocksdb/db/wal_manager.cc +3 -2
  173. package/deps/rocksdb/rocksdb/db/wal_manager.h +0 -1
  174. package/deps/rocksdb/rocksdb/db/wal_manager_test.cc +0 -1
  175. package/deps/rocksdb/rocksdb/db/wide/wide_columns.cc +1 -0
  176. package/deps/rocksdb/rocksdb/db/write_batch.cc +22 -8
  177. package/deps/rocksdb/rocksdb/db/write_batch_internal.h +5 -4
  178. package/deps/rocksdb/rocksdb/db/write_batch_test.cc +7 -6
  179. package/deps/rocksdb/rocksdb/db/write_callback_test.cc +3 -4
  180. package/deps/rocksdb/rocksdb/db/write_thread.h +3 -3
  181. package/deps/rocksdb/rocksdb/db_stress_tool/cf_consistency_stress.cc +13 -5
  182. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_common.h +9 -2
  183. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_compaction_service.h +39 -0
  184. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_compression_manager.h +65 -0
  185. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_gflags.cc +45 -22
  186. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_listener.h +7 -4
  187. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_shared_state.h +22 -5
  188. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_table_properties_collector.h +28 -3
  189. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_test_base.cc +143 -38
  190. package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_test_base.h +4 -3
  191. package/deps/rocksdb/rocksdb/db_stress_tool/expected_state.cc +80 -32
  192. package/deps/rocksdb/rocksdb/db_stress_tool/expected_state.h +51 -2
  193. package/deps/rocksdb/rocksdb/db_stress_tool/multi_ops_txns_stress.cc +23 -1
  194. package/deps/rocksdb/rocksdb/db_stress_tool/no_batched_ops_stress.cc +305 -15
  195. package/deps/rocksdb/rocksdb/env/env.cc +32 -2
  196. package/deps/rocksdb/rocksdb/env/env_encryption.cc +0 -2
  197. package/deps/rocksdb/rocksdb/env/env_encryption_ctr.h +2 -4
  198. package/deps/rocksdb/rocksdb/env/env_posix.cc +4 -2
  199. package/deps/rocksdb/rocksdb/env/env_test.cc +0 -1
  200. package/deps/rocksdb/rocksdb/env/fs_posix.cc +20 -11
  201. package/deps/rocksdb/rocksdb/env/fs_readonly.h +0 -2
  202. package/deps/rocksdb/rocksdb/env/fs_remap.cc +0 -2
  203. package/deps/rocksdb/rocksdb/env/fs_remap.h +0 -2
  204. package/deps/rocksdb/rocksdb/env/io_posix.cc +6 -4
  205. package/deps/rocksdb/rocksdb/env/io_posix.h +3 -2
  206. package/deps/rocksdb/rocksdb/env/mock_env.cc +0 -1
  207. package/deps/rocksdb/rocksdb/file/delete_scheduler.cc +2 -2
  208. package/deps/rocksdb/rocksdb/file/delete_scheduler.h +0 -2
  209. package/deps/rocksdb/rocksdb/file/delete_scheduler_test.cc +0 -2
  210. package/deps/rocksdb/rocksdb/file/file_prefetch_buffer.cc +30 -21
  211. package/deps/rocksdb/rocksdb/file/file_prefetch_buffer.h +16 -0
  212. package/deps/rocksdb/rocksdb/file/file_util.cc +32 -14
  213. package/deps/rocksdb/rocksdb/file/file_util.h +22 -5
  214. package/deps/rocksdb/rocksdb/file/prefetch_test.cc +229 -76
  215. package/deps/rocksdb/rocksdb/file/random_access_file_reader.cc +21 -12
  216. package/deps/rocksdb/rocksdb/file/random_access_file_reader.h +10 -7
  217. package/deps/rocksdb/rocksdb/file/random_access_file_reader_test.cc +12 -8
  218. package/deps/rocksdb/rocksdb/file/sst_file_manager_impl.cc +1 -2
  219. package/deps/rocksdb/rocksdb/file/sst_file_manager_impl.h +0 -2
  220. package/deps/rocksdb/rocksdb/file/writable_file_writer.cc +3 -3
  221. package/deps/rocksdb/rocksdb/include/rocksdb/advanced_compression.h +598 -0
  222. package/deps/rocksdb/rocksdb/include/rocksdb/advanced_iterator.h +36 -0
  223. package/deps/rocksdb/rocksdb/include/rocksdb/advanced_options.h +70 -11
  224. package/deps/rocksdb/rocksdb/include/rocksdb/c.h +232 -11
  225. package/deps/rocksdb/rocksdb/include/rocksdb/cache.h +1 -1
  226. package/deps/rocksdb/rocksdb/include/rocksdb/compaction_job_stats.h +3 -1
  227. package/deps/rocksdb/rocksdb/include/rocksdb/compression_type.h +149 -15
  228. package/deps/rocksdb/rocksdb/include/rocksdb/convenience.h +17 -2
  229. package/deps/rocksdb/rocksdb/include/rocksdb/data_structure.h +132 -34
  230. package/deps/rocksdb/rocksdb/include/rocksdb/db.h +158 -79
  231. package/deps/rocksdb/rocksdb/include/rocksdb/db_bench_tool.h +2 -1
  232. package/deps/rocksdb/rocksdb/include/rocksdb/env.h +4 -5
  233. package/deps/rocksdb/rocksdb/include/rocksdb/env_encryption.h +1 -3
  234. package/deps/rocksdb/rocksdb/include/rocksdb/experimental.h +5 -0
  235. package/deps/rocksdb/rocksdb/include/rocksdb/external_table.h +275 -0
  236. package/deps/rocksdb/rocksdb/include/rocksdb/file_checksum.h +2 -1
  237. package/deps/rocksdb/rocksdb/include/rocksdb/file_system.h +50 -5
  238. package/deps/rocksdb/rocksdb/include/rocksdb/iostats_context.h +10 -0
  239. package/deps/rocksdb/rocksdb/include/rocksdb/iterator.h +13 -0
  240. package/deps/rocksdb/rocksdb/include/rocksdb/ldb_tool.h +0 -1
  241. package/deps/rocksdb/rocksdb/include/rocksdb/listener.h +5 -2
  242. package/deps/rocksdb/rocksdb/include/rocksdb/memtablerep.h +13 -0
  243. package/deps/rocksdb/rocksdb/include/rocksdb/multi_scan.h +237 -0
  244. package/deps/rocksdb/rocksdb/include/rocksdb/options.h +230 -39
  245. package/deps/rocksdb/rocksdb/include/rocksdb/perf_context.h +15 -0
  246. package/deps/rocksdb/rocksdb/include/rocksdb/perf_level.h +31 -11
  247. package/deps/rocksdb/rocksdb/include/rocksdb/slice.h +41 -0
  248. package/deps/rocksdb/rocksdb/include/rocksdb/slice_transform.h +1 -1
  249. package/deps/rocksdb/rocksdb/include/rocksdb/sst_dump_tool.h +0 -1
  250. package/deps/rocksdb/rocksdb/include/rocksdb/sst_file_reader.h +5 -1
  251. package/deps/rocksdb/rocksdb/include/rocksdb/sst_file_writer.h +0 -1
  252. package/deps/rocksdb/rocksdb/include/rocksdb/statistics.h +18 -3
  253. package/deps/rocksdb/rocksdb/include/rocksdb/status.h +2 -0
  254. package/deps/rocksdb/rocksdb/include/rocksdb/table.h +20 -8
  255. package/deps/rocksdb/rocksdb/include/rocksdb/table_properties.h +19 -2
  256. package/deps/rocksdb/rocksdb/include/rocksdb/thread_status.h +1 -1
  257. package/deps/rocksdb/rocksdb/include/rocksdb/tool_hooks.h +124 -0
  258. package/deps/rocksdb/rocksdb/include/rocksdb/trace_record.h +1 -0
  259. package/deps/rocksdb/rocksdb/include/rocksdb/universal_compaction.h +26 -1
  260. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/backup_engine.h +55 -6
  261. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/debug.h +3 -5
  262. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/env_mirror.h +0 -2
  263. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/ldb_cmd.h +1 -2
  264. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/memory_util.h +0 -1
  265. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/object_registry.h +1 -2
  266. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/options_util.h +0 -1
  267. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/secondary_index.h +96 -8
  268. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/secondary_index_faiss.h +117 -0
  269. package/deps/rocksdb/rocksdb/{utilities/secondary_index/faiss_ivf_index.h → include/rocksdb/utilities/secondary_index_simple.h} +11 -14
  270. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/stackable_db.h +26 -11
  271. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/table_properties_collectors.h +16 -3
  272. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/transaction.h +0 -2
  273. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/transaction_db.h +63 -7
  274. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/transaction_db_mutex.h +0 -1
  275. package/deps/rocksdb/rocksdb/include/rocksdb/utilities/write_batch_with_index.h +28 -12
  276. package/deps/rocksdb/rocksdb/include/rocksdb/version.h +3 -3
  277. package/deps/rocksdb/rocksdb/logging/auto_roll_logger_test.cc +0 -2
  278. package/deps/rocksdb/rocksdb/logging/event_logger_test.cc +1 -2
  279. package/deps/rocksdb/rocksdb/memory/memory_allocator_impl.h +1 -1
  280. package/deps/rocksdb/rocksdb/memory/memory_allocator_test.cc +0 -1
  281. package/deps/rocksdb/rocksdb/memtable/hash_linklist_rep.cc +0 -1
  282. package/deps/rocksdb/rocksdb/memtable/memtablerep_bench.cc +3 -1
  283. package/deps/rocksdb/rocksdb/memtable/skiplist.h +2 -2
  284. package/deps/rocksdb/rocksdb/memtable/skiplistrep.cc +2 -4
  285. package/deps/rocksdb/rocksdb/memtable/vectorrep.cc +69 -8
  286. package/deps/rocksdb/rocksdb/memtable/wbwi_memtable.cc +32 -9
  287. package/deps/rocksdb/rocksdb/memtable/wbwi_memtable.h +58 -45
  288. package/deps/rocksdb/rocksdb/monitoring/histogram.h +1 -1
  289. package/deps/rocksdb/rocksdb/monitoring/perf_context.cc +5 -3
  290. package/deps/rocksdb/rocksdb/monitoring/statistics.cc +5 -0
  291. package/deps/rocksdb/rocksdb/monitoring/stats_history_test.cc +1 -1
  292. package/deps/rocksdb/rocksdb/monitoring/thread_status_util_debug.cc +3 -2
  293. package/deps/rocksdb/rocksdb/options/cf_options.cc +44 -13
  294. package/deps/rocksdb/rocksdb/options/cf_options.h +21 -7
  295. package/deps/rocksdb/rocksdb/options/configurable.cc +5 -5
  296. package/deps/rocksdb/rocksdb/options/configurable_test.h +1 -2
  297. package/deps/rocksdb/rocksdb/options/customizable.cc +0 -1
  298. package/deps/rocksdb/rocksdb/options/customizable_test.cc +4 -11
  299. package/deps/rocksdb/rocksdb/options/db_options.cc +18 -15
  300. package/deps/rocksdb/rocksdb/options/db_options.h +2 -2
  301. package/deps/rocksdb/rocksdb/options/options.cc +296 -305
  302. package/deps/rocksdb/rocksdb/options/options_helper.cc +188 -62
  303. package/deps/rocksdb/rocksdb/options/options_helper.h +3 -3
  304. package/deps/rocksdb/rocksdb/options/options_parser.cc +2 -4
  305. package/deps/rocksdb/rocksdb/options/options_parser.h +0 -1
  306. package/deps/rocksdb/rocksdb/options/options_settable_test.cc +17 -4
  307. package/deps/rocksdb/rocksdb/options/options_test.cc +101 -76
  308. package/deps/rocksdb/rocksdb/port/lang.h +2 -1
  309. package/deps/rocksdb/rocksdb/port/port_posix.cc +2 -1
  310. package/deps/rocksdb/rocksdb/port/stack_trace.cc +5 -4
  311. package/deps/rocksdb/rocksdb/port/win/env_win.cc +3 -2
  312. package/deps/rocksdb/rocksdb/port/win/xpress_win.cc +99 -1
  313. package/deps/rocksdb/rocksdb/port/win/xpress_win.h +6 -0
  314. package/deps/rocksdb/rocksdb/src.mk +17 -11
  315. package/deps/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.h +0 -1
  316. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_builder.cc +1094 -929
  317. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_builder.h +6 -19
  318. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_factory.cc +76 -22
  319. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_factory.h +2 -0
  320. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc +221 -131
  321. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader.h +12 -9
  322. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_impl.h +23 -24
  323. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_sync_and_async.h +38 -38
  324. package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_test.cc +7 -4
  325. package/deps/rocksdb/rocksdb/table/block_based/block_cache.cc +5 -5
  326. package/deps/rocksdb/rocksdb/table/block_based/block_cache.h +10 -12
  327. package/deps/rocksdb/rocksdb/table/block_based/block_prefetcher.cc +6 -4
  328. package/deps/rocksdb/rocksdb/table/block_based/block_test.cc +35 -43
  329. package/deps/rocksdb/rocksdb/table/block_based/data_block_hash_index_test.cc +2 -1
  330. package/deps/rocksdb/rocksdb/table/block_based/filter_block.h +1 -1
  331. package/deps/rocksdb/rocksdb/table/block_based/filter_block_reader_common.cc +1 -2
  332. package/deps/rocksdb/rocksdb/table/block_based/filter_policy.cc +0 -4
  333. package/deps/rocksdb/rocksdb/table/block_based/filter_policy_internal.h +0 -1
  334. package/deps/rocksdb/rocksdb/table/block_based/hash_index_reader.cc +3 -3
  335. package/deps/rocksdb/rocksdb/table/block_based/index_reader_common.cc +3 -3
  336. package/deps/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc +4 -4
  337. package/deps/rocksdb/rocksdb/table/block_based/partitioned_index_reader.cc +1 -1
  338. package/deps/rocksdb/rocksdb/table/block_based/uncompression_dict_reader.cc +4 -5
  339. package/deps/rocksdb/rocksdb/table/block_based/uncompression_dict_reader.h +4 -4
  340. package/deps/rocksdb/rocksdb/table/block_fetcher.cc +37 -35
  341. package/deps/rocksdb/rocksdb/table/block_fetcher.h +11 -7
  342. package/deps/rocksdb/rocksdb/table/block_fetcher_test.cc +4 -3
  343. package/deps/rocksdb/rocksdb/table/compaction_merging_iterator.cc +31 -5
  344. package/deps/rocksdb/rocksdb/table/compaction_merging_iterator.h +2 -1
  345. package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_builder.h +0 -1
  346. package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_builder_test.cc +0 -1
  347. package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_reader_test.cc +0 -1
  348. package/deps/rocksdb/rocksdb/table/external_table.cc +483 -0
  349. package/deps/rocksdb/rocksdb/table/format.cc +62 -44
  350. package/deps/rocksdb/rocksdb/table/format.h +35 -12
  351. package/deps/rocksdb/rocksdb/table/internal_iterator.h +3 -13
  352. package/deps/rocksdb/rocksdb/table/iterator_wrapper.h +8 -0
  353. package/deps/rocksdb/rocksdb/table/merging_iterator.cc +6 -0
  354. package/deps/rocksdb/rocksdb/table/meta_blocks.cc +150 -141
  355. package/deps/rocksdb/rocksdb/table/meta_blocks.h +5 -0
  356. package/deps/rocksdb/rocksdb/table/multiget_context.h +3 -2
  357. package/deps/rocksdb/rocksdb/table/plain/plain_table_builder.cc +8 -0
  358. package/deps/rocksdb/rocksdb/table/plain/plain_table_index.cc +0 -1
  359. package/deps/rocksdb/rocksdb/table/plain/plain_table_index.h +0 -2
  360. package/deps/rocksdb/rocksdb/table/plain/plain_table_key_coding.h +0 -2
  361. package/deps/rocksdb/rocksdb/table/plain/plain_table_reader.cc +0 -1
  362. package/deps/rocksdb/rocksdb/table/sst_file_dumper.cc +6 -6
  363. package/deps/rocksdb/rocksdb/table/sst_file_dumper.h +0 -1
  364. package/deps/rocksdb/rocksdb/table/sst_file_reader.cc +86 -7
  365. package/deps/rocksdb/rocksdb/table/sst_file_reader_test.cc +88 -2
  366. package/deps/rocksdb/rocksdb/table/sst_file_writer.cc +0 -1
  367. package/deps/rocksdb/rocksdb/table/table_builder.h +10 -1
  368. package/deps/rocksdb/rocksdb/table/table_reader_bench.cc +3 -2
  369. package/deps/rocksdb/rocksdb/table/table_test.cc +899 -22
  370. package/deps/rocksdb/rocksdb/test_util/testutil.cc +3 -4
  371. package/deps/rocksdb/rocksdb/test_util/testutil.h +132 -1
  372. package/deps/rocksdb/rocksdb/test_util/transaction_test_util.cc +0 -1
  373. package/deps/rocksdb/rocksdb/test_util/transaction_test_util.h +0 -2
  374. package/deps/rocksdb/rocksdb/tools/db_bench_tool.cc +163 -77
  375. package/deps/rocksdb/rocksdb/tools/db_bench_tool_test.cc +0 -2
  376. package/deps/rocksdb/rocksdb/tools/db_repl_stress.cc +0 -1
  377. package/deps/rocksdb/rocksdb/tools/dump/db_dump_tool.cc +0 -1
  378. package/deps/rocksdb/rocksdb/tools/ldb_cmd.cc +120 -52
  379. package/deps/rocksdb/rocksdb/tools/ldb_cmd_test.cc +1 -0
  380. package/deps/rocksdb/rocksdb/tools/ldb_tool.cc +1 -1
  381. package/deps/rocksdb/rocksdb/tools/reduce_levels_test.cc +0 -2
  382. package/deps/rocksdb/rocksdb/tools/simulated_hybrid_file_system.cc +2 -2
  383. package/deps/rocksdb/rocksdb/tools/simulated_hybrid_file_system.h +0 -2
  384. package/deps/rocksdb/rocksdb/tools/sst_dump_tool.cc +2 -1
  385. package/deps/rocksdb/rocksdb/tools/tool_hooks.cc +94 -0
  386. package/deps/rocksdb/rocksdb/tools/trace_analyzer_tool.cc +0 -1
  387. package/deps/rocksdb/rocksdb/tools/trace_analyzer_tool.h +0 -1
  388. package/deps/rocksdb/rocksdb/trace_replay/io_tracer.cc +1 -1
  389. package/deps/rocksdb/rocksdb/trace_replay/io_tracer_test.cc +2 -1
  390. package/deps/rocksdb/rocksdb/trace_replay/trace_replay.cc +3 -5
  391. package/deps/rocksdb/rocksdb/util/async_file_reader.cc +1 -1
  392. package/deps/rocksdb/rocksdb/util/async_file_reader.h +15 -8
  393. package/deps/rocksdb/rocksdb/util/auto_skip_compressor.cc +131 -0
  394. package/deps/rocksdb/rocksdb/util/auto_skip_compressor.h +90 -0
  395. package/deps/rocksdb/rocksdb/util/autovector.h +1 -1
  396. package/deps/rocksdb/rocksdb/util/autovector_test.cc +2 -2
  397. package/deps/rocksdb/rocksdb/util/compaction_job_stats_impl.cc +0 -2
  398. package/deps/rocksdb/rocksdb/util/compression.cc +936 -4
  399. package/deps/rocksdb/rocksdb/util/compression.h +348 -232
  400. package/deps/rocksdb/rocksdb/util/compression_test.cc +229 -0
  401. package/deps/rocksdb/rocksdb/util/crc32c_arm64.cc +10 -10
  402. package/deps/rocksdb/rocksdb/util/crc32c_ppc.c +1 -0
  403. package/deps/rocksdb/rocksdb/util/data_structure.cc +2 -0
  404. package/deps/rocksdb/rocksdb/util/file_reader_writer_test.cc +1 -3
  405. package/deps/rocksdb/rocksdb/util/ppc-opcode.h +5 -5
  406. package/deps/rocksdb/rocksdb/util/simple_mixed_compressor.cc +108 -0
  407. package/deps/rocksdb/rocksdb/util/simple_mixed_compressor.h +67 -0
  408. package/deps/rocksdb/rocksdb/util/slice_test.cc +83 -0
  409. package/deps/rocksdb/rocksdb/util/string_util.cc +0 -2
  410. package/deps/rocksdb/rocksdb/util/string_util.h +10 -0
  411. package/deps/rocksdb/rocksdb/util/thread_operation.h +2 -1
  412. package/deps/rocksdb/rocksdb/util/udt_util.cc +18 -5
  413. package/deps/rocksdb/rocksdb/util/udt_util.h +10 -7
  414. package/deps/rocksdb/rocksdb/utilities/backup/backup_engine.cc +650 -154
  415. package/deps/rocksdb/rocksdb/utilities/backup/backup_engine_test.cc +438 -144
  416. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_compaction_filter.cc +0 -1
  417. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db.h +0 -1
  418. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_gc_stats.h +0 -1
  419. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_impl.cc +16 -17
  420. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_impl.h +2 -1
  421. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_impl_filesnapshot.cc +0 -1
  422. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_listener.h +0 -1
  423. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_test.cc +7 -8
  424. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_dump_tool.cc +4 -3
  425. package/deps/rocksdb/rocksdb/utilities/blob_db/blob_dump_tool.h +0 -1
  426. package/deps/rocksdb/rocksdb/utilities/cache_dump_load.cc +0 -1
  427. package/deps/rocksdb/rocksdb/utilities/cache_dump_load_impl.cc +2 -2
  428. package/deps/rocksdb/rocksdb/utilities/checkpoint/checkpoint_impl.cc +1 -1
  429. package/deps/rocksdb/rocksdb/utilities/checkpoint/checkpoint_test.cc +0 -48
  430. package/deps/rocksdb/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc +0 -1
  431. package/deps/rocksdb/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.h +0 -1
  432. package/deps/rocksdb/rocksdb/utilities/debug.cc +7 -14
  433. package/deps/rocksdb/rocksdb/utilities/env_mirror.cc +0 -1
  434. package/deps/rocksdb/rocksdb/utilities/env_mirror_test.cc +0 -2
  435. package/deps/rocksdb/rocksdb/utilities/env_timed.cc +0 -1
  436. package/deps/rocksdb/rocksdb/utilities/env_timed_test.cc +0 -2
  437. package/deps/rocksdb/rocksdb/utilities/fault_injection_fs.cc +5 -3
  438. package/deps/rocksdb/rocksdb/utilities/fault_injection_fs.h +10 -9
  439. package/deps/rocksdb/rocksdb/utilities/memory/memory_test.cc +0 -1
  440. package/deps/rocksdb/rocksdb/utilities/memory/memory_util.cc +0 -1
  441. package/deps/rocksdb/rocksdb/utilities/memory_allocators.h +1 -0
  442. package/deps/rocksdb/rocksdb/utilities/object_registry_test.cc +0 -2
  443. package/deps/rocksdb/rocksdb/utilities/options/options_util.cc +0 -1
  444. package/deps/rocksdb/rocksdb/utilities/options/options_util_test.cc +0 -1
  445. package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier.cc +0 -1
  446. package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier.h +0 -2
  447. package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_file.h +0 -2
  448. package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.cc +0 -1
  449. package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.h +0 -2
  450. package/deps/rocksdb/rocksdb/utilities/persistent_cache/hash_table.h +0 -2
  451. package/deps/rocksdb/rocksdb/utilities/persistent_cache/hash_table_evictable.h +0 -2
  452. package/deps/rocksdb/rocksdb/utilities/persistent_cache/lrulist.h +0 -2
  453. package/deps/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_test.h +0 -2
  454. package/deps/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_tier.cc +0 -1
  455. package/deps/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_tier.h +0 -2
  456. package/deps/rocksdb/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc +0 -1
  457. package/deps/rocksdb/rocksdb/utilities/persistent_cache/volatile_tier_impl.h +0 -2
  458. package/deps/rocksdb/rocksdb/utilities/secondary_index/faiss_ivf_index.cc +183 -32
  459. package/deps/rocksdb/rocksdb/utilities/secondary_index/faiss_ivf_index_test.cc +258 -12
  460. package/deps/rocksdb/rocksdb/utilities/secondary_index/secondary_index_helper.h +33 -0
  461. package/deps/rocksdb/rocksdb/utilities/secondary_index/secondary_index_iterator.cc +99 -0
  462. package/deps/rocksdb/rocksdb/utilities/secondary_index/secondary_index_mixin.h +280 -120
  463. package/deps/rocksdb/rocksdb/utilities/secondary_index/simple_secondary_index.cc +79 -0
  464. package/deps/rocksdb/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.cc +52 -16
  465. package/deps/rocksdb/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.h +10 -6
  466. package/deps/rocksdb/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector_test.cc +55 -0
  467. package/deps/rocksdb/rocksdb/utilities/trace/replayer_impl.cc +0 -1
  468. package/deps/rocksdb/rocksdb/utilities/transactions/lock/lock_manager.cc +0 -2
  469. package/deps/rocksdb/rocksdb/utilities/transactions/lock/lock_manager.h +0 -1
  470. package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_manager.cc +37 -12
  471. package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_manager.h +2 -0
  472. package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_manager_test.cc +0 -2
  473. package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_tracker.cc +0 -2
  474. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_locking_test.cc +1 -1
  475. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/db.h +1 -1
  476. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +1 -1
  477. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/dbt.cc +2 -1
  478. package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc +2 -2
  479. package/deps/rocksdb/rocksdb/utilities/transactions/optimistic_transaction.cc +0 -1
  480. package/deps/rocksdb/rocksdb/utilities/transactions/optimistic_transaction.h +0 -2
  481. package/deps/rocksdb/rocksdb/utilities/transactions/optimistic_transaction_db_impl.cc +1 -3
  482. package/deps/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction.cc +36 -10
  483. package/deps/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction.h +5 -7
  484. package/deps/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction_db.cc +4 -5
  485. package/deps/rocksdb/rocksdb/utilities/transactions/snapshot_checker.cc +1 -4
  486. package/deps/rocksdb/rocksdb/utilities/transactions/transaction_base.h +1 -2
  487. package/deps/rocksdb/rocksdb/utilities/transactions/transaction_db_mutex_impl.cc +0 -2
  488. package/deps/rocksdb/rocksdb/utilities/transactions/transaction_db_mutex_impl.h +0 -1
  489. package/deps/rocksdb/rocksdb/utilities/transactions/transaction_test.cc +1118 -37
  490. package/deps/rocksdb/rocksdb/utilities/transactions/transaction_test.h +4 -7
  491. package/deps/rocksdb/rocksdb/utilities/transactions/transaction_util.cc +0 -2
  492. package/deps/rocksdb/rocksdb/utilities/transactions/transaction_util.h +0 -2
  493. package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_transaction_test.cc +3 -3
  494. package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.cc +0 -1
  495. package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_transaction_test.cc +0 -2
  496. package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn.cc +1 -2
  497. package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn.h +1 -2
  498. package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn_db.cc +0 -1
  499. package/deps/rocksdb/rocksdb/utilities/ttl/ttl_test.cc +0 -3
  500. package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index.cc +125 -127
  501. package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.cc +45 -23
  502. package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.h +54 -22
  503. package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_test.cc +477 -58
  504. package/deps/rocksdb/rocksdb.gyp +5 -0
  505. package/index.js +47 -2
  506. package/package.json +8 -1
  507. package/prebuilds/darwin-arm64/@nxtedition+rocksdb.node +0 -0
  508. package/prebuilds/linux-x64/@nxtedition+rocksdb.node +0 -0
@@ -0,0 +1,275 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ // This source code is licensed under both the GPLv2 (found in the
3
+ // COPYING file in the root directory) and Apache 2.0 License
4
+ // (found in the LICENSE.Apache file in the root directory).
5
+
6
+ #pragma once
7
+
8
+ #include "rocksdb/advanced_iterator.h"
9
+ #include "rocksdb/customizable.h"
10
+ #include "rocksdb/file_checksum.h"
11
+ #include "rocksdb/file_system.h"
12
+ #include "rocksdb/iterator_base.h"
13
+ #include "rocksdb/options.h"
14
+ #include "rocksdb/status.h"
15
+
16
+ namespace ROCKSDB_NAMESPACE {
17
+
18
+ class ExternalTableFactory;
19
+
20
+ // EXPERIMENTAL
21
+ // The interface defined in this file is subject to change at any time without
22
+ // warning!!
23
+
24
+ // This file defines an interface for plugging in an external table
25
+ // into RocksDB. The external table reader will be used instead of the
26
+ // BlockBasedTable to load and query sst files.
27
+ // The external table files can be created using an SstFileWriter. Eventually
28
+ // external tables will be allowed to be ingested into a RocksDB instance
29
+ // using the IngestExternalFIle() API.
30
+ //
31
+ // Initial support is for writing and querying the files using an
32
+ // SstFileWriter and SstFileReader. We will add support for ingestion of an
33
+ // external table into a limited RocksDB instance that only supports ingestion
34
+ // and not live writes in the near future. It'll be followed by support for
35
+ // replacing the column family by ingesting a new set of files. In all cases,
36
+ // the external table files will only be allowed in the bottommost level.
37
+ //
38
+ // The external table can support one or both of the following layouts -
39
+ // 1. Total order seek - All the keys in the files are in sorted order, and a
40
+ // user can seek to the first, last, or any key in between and iterate
41
+ // forwards or backwards till the end of the range. To support this mode,
42
+ // the implementation needs to use the comparator passed in
43
+ // ExternalTableOptions to enforce the key ordering. The prefix_extractor
44
+ // in ExternalTableOptions and the ExternalTableReader interfaces can be
45
+ // ignored.
46
+ // 2. Prefix seek - In this mode, the prefix_extractor is used to extract the
47
+ // prefix from a key. All the keys sharing the same prefix are ordered in
48
+ // ascending order according to the comparator. However, no specific
49
+ // ordering is required across prefixes. Users can scan keys by seeking
50
+ // to a specific key inside a prefix, and iterate forwards or backwards
51
+ // within the prefix. The prefix_same_as_start flag in ReadOptions will
52
+ // be true.
53
+ // 3. Both - If supporting both of the above, a user can seek inside a prefix
54
+ // and iterate beyond the prefix. The prefix_same_as_start in ReadOptions
55
+ // will be false. Additionally, the total_order_seek flag can be set to
56
+ // true to seek to the first non-empty prefix (as determined by the key
57
+ // order) if the seek prefix is empty.
58
+ //
59
+ // Many of the options in ReadOptions and WriteOptions may not be relevant to
60
+ // the external table implementation.
61
+ // TODO: Specify which options are relevant
62
+
63
+ class ExternalTableIterator : public IteratorBase {
64
+ public:
65
+ virtual ~ExternalTableIterator() {}
66
+
67
+ // This can optionally be called to prepare the iterator for a series
68
+ // of scans. The scan_opts parameter specifies the order of scans to
69
+ // follow, as well as the limits for those scans. After calling this,
70
+ // the caller will Seek() the iterator to successive start keys in scan_opts.
71
+ //
72
+ // If Prepare() is called again with a different scan_opts pointer, it
73
+ // means the iterator will be reused for a new multi scan. If scan_opts
74
+ // is null, then the previous Prepare() can be discarded.
75
+ //
76
+ // The caller guarantees the lifetime of scan_opts until its either cleared
77
+ // or replaced by another Prepare().
78
+ // TODO: Update the contract to trim the scan_opts range to only include
79
+ // scans that potentially intersect the file key range.
80
+ //
81
+ // If the sequence of Seeks is interrupted by seeking to some other target
82
+ // key, then the iterator is free to discard anything done during Prepare.
83
+ virtual void Prepare(const ScanOptions scan_opts[], size_t num_opts) = 0;
84
+
85
+ // Similar to Next(), except it also fills the result and returns whether
86
+ // the iterator is on a valid key or not
87
+ virtual bool NextAndGetResult(IterateResult* result) = 0;
88
+
89
+ // Prepares the value if its lazily materialized. The implementation can
90
+ // request that this be called by setting value_prepared to false in
91
+ // IterateResult. Next() should always implicitly materialize the
92
+ // value.
93
+ bool PrepareValue() override = 0;
94
+
95
+ // Return the current key's value
96
+ virtual Slice value() const = 0;
97
+
98
+ // Return the current position bounds check result - kInbound if the
99
+ // position is a valid key, kOutOfBound if the key is out of bound (i.e
100
+ // scan has terminated), or kUnknown if end of file.
101
+ virtual IterBoundCheck UpperBoundCheckResult() = 0;
102
+ };
103
+
104
+ class ExternalTableReader {
105
+ public:
106
+ virtual ~ExternalTableReader() {}
107
+
108
+ // Return an Iterator that can be used to scan the table file.
109
+ // The read_options can optionally contain the upper bound
110
+ // key (exclusive) of the scan in iterate_upper_bound.
111
+ virtual ExternalTableIterator* NewIterator(
112
+ const ReadOptions& read_options,
113
+ const SliceTransform* prefix_extractor) = 0;
114
+
115
+ // Point lookup the given key and return its value
116
+ virtual Status Get(const ReadOptions& read_options, const Slice& key,
117
+ const SliceTransform* prefix_extractor,
118
+ std::string* value) = 0;
119
+
120
+ // Point lookup the given vector of keys and return the values, as well
121
+ // as status of each individual lookup in statuses.
122
+ virtual void MultiGet(const ReadOptions& read_options,
123
+ const std::vector<Slice>& keys,
124
+ const SliceTransform* prefix_extractor,
125
+ std::vector<std::string>* values,
126
+ std::vector<Status>* statuses) = 0;
127
+
128
+ // Allocate and return the contents of the properties block. If the builder
129
+ // supports PutPropertiesBlock(), then this must be supported. The
130
+ // properties block should be written to the table file as is (no
131
+ // compression or mutation of any kind), and its offset in the file
132
+ // should be returned in file_offset.
133
+ virtual Status GetPropertiesBlock(std::unique_ptr<char[]>* /*property_block*/,
134
+ uint64_t* /*size*/,
135
+ uint64_t* /*file_offset*/) {
136
+ return Status::NotSupported();
137
+ }
138
+
139
+ // Return TableProperties for the file. At a minimum, the following
140
+ // properties need to be returned -
141
+ // comparator_name
142
+ // num_entries
143
+ // raw_key_size
144
+ // raw_value_size
145
+ virtual std::shared_ptr<const TableProperties> GetTableProperties() const = 0;
146
+
147
+ virtual Status VerifyChecksum(const ReadOptions& /*ro*/) {
148
+ return Status::NotSupported("VerifyChecksum() not supported");
149
+ }
150
+ };
151
+
152
+ // A table builder interface that can be used by SstFileWriter to allow
153
+ // RocksDB users to write external table files. The sequence of operations
154
+ // to write an external table is as follows -
155
+ // 1. Add() is called one or more times to write all key-values to the table.
156
+ // Its called in increasing key order, as determined by the comparator.
157
+ // The input key is a user key, i.e sequence number and value type are
158
+ // stripped out.
159
+ // 2. After every Add() operation, status() is called to check the current
160
+ // status.
161
+ // 3. After the last key is added, Finish() is called to do whatever is
162
+ // necessary to ensure the data is persisted in the table file.
163
+ // 4. If there is a failure midway for some reason, Abandon() is called
164
+ // instead of Finish().
165
+ // 5. At the end, FileSize(), GetTableProperties(), and status() are called to
166
+ // get the final size of the file, the table properties, and the final
167
+ // status. GetFileChecksum() and GetFileChecksumFuncName() may also be
168
+ // called to get checksum information about the whole file, but their
169
+ // implementation is optional.
170
+ class ExternalTableBuilder {
171
+ public:
172
+ virtual ~ExternalTableBuilder() {}
173
+
174
+ // Write a single KV to the table file. This is guaranteed to be called
175
+ // in key order, and the write may be buffered and flushed at a later time.
176
+ virtual void Add(const Slice& key, const Slice& value) = 0;
177
+
178
+ // Return the current Status. This could return non-ok, for example, if
179
+ // Add() fails for some reason.
180
+ virtual Status status() const = 0;
181
+
182
+ // Flush and close the table file
183
+ virtual Status Finish() = 0;
184
+
185
+ // Delete the partial file and release any allocated resources. Either this
186
+ // or Finish() will be called, but not both.
187
+ virtual void Abandon() = 0;
188
+
189
+ // Return the size of the table file. Will be called at the end, after
190
+ // Finish().
191
+ virtual uint64_t FileSize() const = 0;
192
+
193
+ // Write the raw properties block as is in the table file
194
+ virtual Status PutPropertiesBlock(const Slice& /*property_block*/) {
195
+ return Status::NotSupported();
196
+ }
197
+
198
+ // As mentioned in earlier comments, the following table properties must be
199
+ // returned at a minimum -
200
+ // comparator_name
201
+ // num_entries
202
+ // raw_key_size
203
+ // raw_value_size
204
+ virtual TableProperties GetTableProperties() const = 0;
205
+
206
+ virtual std::string GetFileChecksum() const { return kUnknownFileChecksum; }
207
+
208
+ virtual const char* GetFileChecksumFuncName() const {
209
+ return kUnknownFileChecksumFuncName;
210
+ }
211
+ };
212
+
213
+ struct ExternalTableOptions {
214
+ const std::shared_ptr<const SliceTransform>& prefix_extractor;
215
+ const Comparator* comparator;
216
+ const std::shared_ptr<FileSystem>& fs;
217
+ const FileOptions& file_options;
218
+
219
+ ExternalTableOptions(
220
+ const std::shared_ptr<const SliceTransform>& _prefix_extractor,
221
+ const Comparator* _comparator, const std::shared_ptr<FileSystem>& _fs,
222
+ const FileOptions& _file_options)
223
+ : prefix_extractor(_prefix_extractor),
224
+ comparator(_comparator),
225
+ fs(_fs),
226
+ file_options(_file_options) {}
227
+ };
228
+
229
+ struct ExternalTableBuilderOptions {
230
+ const ReadOptions& read_options;
231
+ const WriteOptions& write_options;
232
+ const std::shared_ptr<const SliceTransform>& prefix_extractor;
233
+ const Comparator* comparator;
234
+ const std::string& column_family_name;
235
+ const std::string db_id;
236
+ const std::string db_session_id;
237
+ const TableFileCreationReason reason;
238
+
239
+ ExternalTableBuilderOptions(
240
+ const ReadOptions& _read_options, const WriteOptions& _write_options,
241
+ const std::shared_ptr<const SliceTransform>& _prefix_extractor,
242
+ const Comparator* _comparator, const std::string& _column_family_name,
243
+ const TableFileCreationReason _reason)
244
+ : read_options(_read_options),
245
+ write_options(_write_options),
246
+ prefix_extractor(_prefix_extractor),
247
+ comparator(_comparator),
248
+ column_family_name(_column_family_name),
249
+ reason(_reason) {}
250
+ };
251
+
252
+ class ExternalTableFactory : public Customizable {
253
+ public:
254
+ ~ExternalTableFactory() override {}
255
+
256
+ const char* Name() const override { return "ExternalTableFactory"; }
257
+
258
+ virtual Status NewTableReader(
259
+ const ReadOptions& read_options, const std::string& file_path,
260
+ const ExternalTableOptions& table_options,
261
+ std::unique_ptr<ExternalTableReader>* table_reader) const = 0;
262
+
263
+ // The table builder should use the file pointer to append to the file.
264
+ // Do not sync or close the file after finishing. RocksDB will do that.
265
+ virtual ExternalTableBuilder* NewTableBuilder(
266
+ const ExternalTableBuilderOptions& builder_options,
267
+ const std::string& file_path, FSWritableFile* file) const = 0;
268
+ };
269
+
270
+ // Allocate a TableFactory that wraps around an ExternalTableFactory. Use this
271
+ // to allocate and set in ColumnFamilyOptions::table_factory.
272
+ std::unique_ptr<TableFactory> NewExternalTableFactory(
273
+ std::shared_ptr<ExternalTableFactory> inner_factory);
274
+
275
+ } // namespace ROCKSDB_NAMESPACE
@@ -80,7 +80,8 @@ class FileChecksumGenFactory : public Customizable {
80
80
  const ConfigOptions& options, const std::string& value,
81
81
  std::shared_ptr<FileChecksumGenFactory>* result);
82
82
 
83
- // Create a new FileChecksumGenerator.
83
+ // Create a new FileChecksumGenerator. Recommended to return nullptr if the
84
+ // requested function name is not recognized.
84
85
  virtual std::unique_ptr<FileChecksumGenerator> CreateFileChecksumGenerator(
85
86
  const FileChecksumGenContext& context) = 0;
86
87
 
@@ -18,6 +18,7 @@
18
18
 
19
19
  #include <stdint.h>
20
20
 
21
+ #include <any>
21
22
  #include <chrono>
22
23
  #include <cstdarg>
23
24
  #include <functional>
@@ -192,6 +193,12 @@ struct FileOptions : EnvOptions {
192
193
  // handoff during file writes.
193
194
  ChecksumType handoff_checksum_type;
194
195
 
196
+ // Expose write lifetime hint on the FileOptions level to provide more
197
+ // flexibility in setting the hint in downstream, custom implementations
198
+ // that might be able to process the hint only at the time of the actual
199
+ // FSWritableFile object creation.
200
+ Env::WriteLifeTimeHint write_hint = Env::WLTH_NOT_SET;
201
+
195
202
  FileOptions() : EnvOptions(), handoff_checksum_type(ChecksumType::kCRC32c) {}
196
203
 
197
204
  FileOptions(const DBOptions& opts)
@@ -206,13 +213,16 @@ struct FileOptions : EnvOptions {
206
213
  : EnvOptions(opts),
207
214
  io_options(opts.io_options),
208
215
  temperature(opts.temperature),
209
- handoff_checksum_type(opts.handoff_checksum_type) {}
216
+ handoff_checksum_type(opts.handoff_checksum_type),
217
+ write_hint(opts.write_hint) {}
210
218
 
211
219
  FileOptions& operator=(const FileOptions&) = default;
212
220
  };
213
221
 
214
222
  // A structure to pass back some debugging information from the FileSystem
215
223
  // implementation to RocksDB in case of an IO error
224
+ // TODO(virajthakur): Update all calls to FS APIs for writes to pass in
225
+ // IODebugContext
216
226
  struct IODebugContext {
217
227
  // file_path to be filled in by RocksDB in case of an error
218
228
  std::string file_path;
@@ -223,8 +233,9 @@ struct IODebugContext {
223
233
  // To be set by the FileSystem implementation
224
234
  std::string msg;
225
235
 
226
- // To be set by the underlying FileSystem implementation.
227
- std::string request_id;
236
+ // To be set by the application, to allow tracing logs/metrics from user ->
237
+ // RocksDB -> FS.
238
+ const std::string* request_id = nullptr;
228
239
 
229
240
  // In order to log required information in IO tracing for different
230
241
  // operations, Each bit in trace_data stores which corresponding info from
@@ -240,16 +251,44 @@ struct IODebugContext {
240
251
  };
241
252
  uint64_t trace_data = 0;
242
253
 
254
+ // Arbitrary structure containing cost information about the IO request
255
+ std::any cost_info;
256
+
243
257
  IODebugContext() {}
244
258
 
259
+ // Copy constructor
260
+ IODebugContext(const IODebugContext& other)
261
+ : file_path(other.file_path),
262
+ counters(other.counters),
263
+ msg(other.msg),
264
+ trace_data(other.trace_data),
265
+ cost_info(other.cost_info),
266
+ _request_id(other.request_id ? *other.request_id : "") {
267
+ request_id = other.request_id ? &_request_id : nullptr;
268
+ }
269
+
270
+ // Copy assignment operator
271
+ IODebugContext& operator=(const IODebugContext& other) {
272
+ if (this != &other) {
273
+ file_path = other.file_path;
274
+ counters = other.counters;
275
+ msg = other.msg;
276
+ trace_data = other.trace_data;
277
+ cost_info = other.cost_info;
278
+ _request_id = other.request_id ? *other.request_id : "";
279
+ request_id = other.request_id ? &_request_id : nullptr;
280
+ }
281
+ return *this;
282
+ }
283
+
245
284
  void AddCounter(std::string& name, uint64_t value) {
246
285
  counters.emplace(name, value);
247
286
  }
248
287
 
249
288
  // Called by underlying file system to set request_id and log request_id in
250
289
  // IOTracing.
251
- void SetRequestId(const std::string& _request_id) {
252
- request_id = _request_id;
290
+ void SetRequestId(const std::string* updated_request_id) {
291
+ request_id = updated_request_id;
253
292
  trace_data |= (1 << TraceData::kRequestID);
254
293
  }
255
294
 
@@ -262,6 +301,12 @@ struct IODebugContext {
262
301
  ss << msg;
263
302
  return ss.str();
264
303
  }
304
+
305
+ private:
306
+ // Private member that allows for safe copying of IODebugContext without any
307
+ // memory ownership issues. After copying, request_id can point directly to
308
+ // this field.
309
+ std::string _request_id;
265
310
  };
266
311
 
267
312
  // A function pointer type for custom destruction of void pointer passed to
@@ -10,8 +10,18 @@
10
10
 
11
11
  #include "rocksdb/perf_level.h"
12
12
 
13
+ /*
14
+ * NOTE:
15
+ * If you plan to add new metrics, please read documentation in perf_level.h and
16
+ * try to come up with a metric name that follows the naming conventions
17
+ * mentioned there. It helps to indicate the metric's starting enabling P
18
+ * erfLevel. Document this starting PerfLevel if the metric name cannot meet the
19
+ * naming conventions.
20
+ */
21
+
13
22
  // A thread local context for gathering io-stats efficiently and transparently.
14
23
  // Use SetPerfLevel(PerfLevel::kEnableTime) to enable time stats.
24
+ //
15
25
 
16
26
  namespace ROCKSDB_NAMESPACE {
17
27
 
@@ -21,6 +21,7 @@
21
21
  #include <string>
22
22
 
23
23
  #include "rocksdb/iterator_base.h"
24
+ #include "rocksdb/options.h"
24
25
  #include "rocksdb/wide_columns.h"
25
26
 
26
27
  namespace ROCKSDB_NAMESPACE {
@@ -93,6 +94,18 @@ class Iterator : public IteratorBase {
93
94
  assert(false);
94
95
  return Slice();
95
96
  }
97
+
98
+ // RocksDB Internal - DO NOT USE
99
+ // Prepare the iterator to scan the ranges specified in scan_opts. The
100
+ // upper bound and other table specific limits may be specified. This will
101
+ // typically be followed by Seeks to the start keys in the order they're
102
+ // specified in scan_opts. If the user does a Seek to some other target key,
103
+ // the iterator should disregard the scan_opts from that point onwards and
104
+ // behave like a normal iterator. Its the user's responsibility to again
105
+ // call Prepare().
106
+ // If Prepare() is called, it overrides the iterate_upper_bound in
107
+ // ReadOptions
108
+ virtual void Prepare(const std::vector<ScanOptions>& /*scan_opts*/) {}
96
109
  };
97
110
 
98
111
  // Return an empty iterator (yields nothing).
@@ -39,4 +39,3 @@ class LDBTool {
39
39
  };
40
40
 
41
41
  } // namespace ROCKSDB_NAMESPACE
42
-
@@ -183,6 +183,8 @@ enum class FlushReason : int {
183
183
  kWalFull = 0xd,
184
184
  // SwitchMemtable will not be called for this flush reason.
185
185
  kCatchUpAfterErrorRecovery = 0xe,
186
+
187
+ // When adding flush reason, make sure to also add it to FlushReason in Java.
186
188
  };
187
189
 
188
190
  const char* GetFlushReasonString(FlushReason flush_reason);
@@ -211,7 +213,6 @@ struct WriteStallInfo {
211
213
  } condition;
212
214
  };
213
215
 
214
-
215
216
  struct FileDeletionInfo {
216
217
  FileDeletionInfo() = default;
217
218
 
@@ -438,6 +439,9 @@ struct CompactionJobInfo {
438
439
  // the job id, which is unique in the same thread.
439
440
  int job_id;
440
441
 
442
+ // the number of L0 files in the CF right before and after the compaction
443
+ int num_l0_files;
444
+
441
445
  // the smallest input level of the compaction.
442
446
  int base_input_level;
443
447
  // the output level of the compaction.
@@ -865,5 +869,4 @@ class EventListener : public Customizable {
865
869
  ~EventListener() override {}
866
870
  };
867
871
 
868
-
869
872
  } // namespace ROCKSDB_NAMESPACE
@@ -162,6 +162,12 @@ class MemTableRep {
162
162
  return true;
163
163
  }
164
164
 
165
+ // Only used after concurrent memtable inserts.
166
+ // This function will be called by each writer after all writes are done
167
+ // through InsertConcurrently().
168
+ // This is used by VectorRep to do batched writes for concurrent inserts.
169
+ virtual void BatchPostProcess() {}
170
+
165
171
  // Returns true iff an entry that compares equal to key is in the collection.
166
172
  virtual bool Contains(const char* key) const = 0;
167
173
 
@@ -397,6 +403,11 @@ class SkipListFactory : public MemTableRepFactory {
397
403
  // the vector is sorted. This is useful for workloads where iteration is very
398
404
  // rare and writes are generally not issued after reads begin.
399
405
  //
406
+ // Concurrent inserts are supported by buffering writes in thread-local vectors
407
+ // for each write batch. To optimize performance for concurrent inserts, it is
408
+ // recommended to perform batched writes, and enable unordered_write (refer to
409
+ // the option comment for its impact on read consistency).
410
+ //
400
411
  // Parameters:
401
412
  // count: Passed to the constructor of the underlying std::vector of each
402
413
  // VectorRep. On initialization, the underlying array will be at least count
@@ -418,6 +429,8 @@ class VectorRepFactory : public MemTableRepFactory {
418
429
  MemTableRep* CreateMemTableRep(const MemTableRep::KeyComparator&, Allocator*,
419
430
  const SliceTransform*,
420
431
  Logger* logger) override;
432
+
433
+ bool IsInsertConcurrentlySupported() const override { return true; }
421
434
  };
422
435
 
423
436
  // This class contains a fixed array of buckets, each