rocksdb-native 2.6.2 → 2.6.4

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 (956) hide show
  1. package/CMakeLists.txt +29 -17
  2. package/binding.js +1 -1
  3. package/package.json +7 -4
  4. package/prebuilds/darwin-arm64/rocksdb-native.bare +0 -0
  5. package/prebuilds/darwin-arm64/rocksdb-native.node +0 -0
  6. package/prebuilds/darwin-x64/rocksdb-native.bare +0 -0
  7. package/prebuilds/darwin-x64/rocksdb-native.node +0 -0
  8. package/prebuilds/ios-arm64/rocksdb-native.bare +0 -0
  9. package/prebuilds/ios-arm64-simulator/rocksdb-native.bare +0 -0
  10. package/prebuilds/ios-x64-simulator/rocksdb-native.bare +0 -0
  11. package/prebuilds/linux-arm64/rocksdb-native.bare +0 -0
  12. package/prebuilds/linux-arm64/rocksdb-native.node +0 -0
  13. package/prebuilds/linux-x64/rocksdb-native.bare +0 -0
  14. package/prebuilds/linux-x64/rocksdb-native.node +0 -0
  15. package/prebuilds/win32-arm64/rocksdb-native.bare +0 -0
  16. package/prebuilds/win32-arm64/rocksdb-native.node +0 -0
  17. package/prebuilds/win32-x64/rocksdb-native.bare +0 -0
  18. package/prebuilds/win32-x64/rocksdb-native.node +0 -0
  19. package/vendor/librocksdb/CMakeLists.txt +0 -94
  20. package/vendor/librocksdb/LICENSE +0 -201
  21. package/vendor/librocksdb/NOTICE +0 -13
  22. package/vendor/librocksdb/README.md +0 -11
  23. package/vendor/librocksdb/include/rocksdb.h +0 -294
  24. package/vendor/librocksdb/src/rocksdb.cc +0 -714
  25. package/vendor/librocksdb/vendor/rocksdb/CMakeLists.txt +0 -1642
  26. package/vendor/librocksdb/vendor/rocksdb/cache/cache.cc +0 -193
  27. package/vendor/librocksdb/vendor/rocksdb/cache/cache_bench.cc +0 -20
  28. package/vendor/librocksdb/vendor/rocksdb/cache/cache_bench_tool.cc +0 -1177
  29. package/vendor/librocksdb/vendor/rocksdb/cache/cache_entry_roles.cc +0 -104
  30. package/vendor/librocksdb/vendor/rocksdb/cache/cache_entry_roles.h +0 -20
  31. package/vendor/librocksdb/vendor/rocksdb/cache/cache_entry_stats.h +0 -182
  32. package/vendor/librocksdb/vendor/rocksdb/cache/cache_helpers.cc +0 -41
  33. package/vendor/librocksdb/vendor/rocksdb/cache/cache_helpers.h +0 -139
  34. package/vendor/librocksdb/vendor/rocksdb/cache/cache_key.cc +0 -364
  35. package/vendor/librocksdb/vendor/rocksdb/cache/cache_key.h +0 -143
  36. package/vendor/librocksdb/vendor/rocksdb/cache/cache_reservation_manager.cc +0 -184
  37. package/vendor/librocksdb/vendor/rocksdb/cache/cache_reservation_manager.h +0 -318
  38. package/vendor/librocksdb/vendor/rocksdb/cache/charged_cache.cc +0 -111
  39. package/vendor/librocksdb/vendor/rocksdb/cache/charged_cache.h +0 -61
  40. package/vendor/librocksdb/vendor/rocksdb/cache/clock_cache.cc +0 -3657
  41. package/vendor/librocksdb/vendor/rocksdb/cache/clock_cache.h +0 -1165
  42. package/vendor/librocksdb/vendor/rocksdb/cache/compressed_secondary_cache.cc +0 -414
  43. package/vendor/librocksdb/vendor/rocksdb/cache/compressed_secondary_cache.h +0 -151
  44. package/vendor/librocksdb/vendor/rocksdb/cache/lru_cache.cc +0 -726
  45. package/vendor/librocksdb/vendor/rocksdb/cache/lru_cache.h +0 -467
  46. package/vendor/librocksdb/vendor/rocksdb/cache/secondary_cache.cc +0 -12
  47. package/vendor/librocksdb/vendor/rocksdb/cache/secondary_cache_adapter.cc +0 -743
  48. package/vendor/librocksdb/vendor/rocksdb/cache/secondary_cache_adapter.h +0 -103
  49. package/vendor/librocksdb/vendor/rocksdb/cache/sharded_cache.cc +0 -147
  50. package/vendor/librocksdb/vendor/rocksdb/cache/sharded_cache.h +0 -322
  51. package/vendor/librocksdb/vendor/rocksdb/cache/tiered_secondary_cache.cc +0 -125
  52. package/vendor/librocksdb/vendor/rocksdb/cache/tiered_secondary_cache.h +0 -158
  53. package/vendor/librocksdb/vendor/rocksdb/cache/typed_cache.h +0 -380
  54. package/vendor/librocksdb/vendor/rocksdb/cmake/RocksDBConfig.cmake.in +0 -54
  55. package/vendor/librocksdb/vendor/rocksdb/db/arena_wrapped_db_iter.cc +0 -182
  56. package/vendor/librocksdb/vendor/rocksdb/db/arena_wrapped_db_iter.h +0 -128
  57. package/vendor/librocksdb/vendor/rocksdb/db/attribute_group_iterator_impl.cc +0 -20
  58. package/vendor/librocksdb/vendor/rocksdb/db/attribute_group_iterator_impl.h +0 -83
  59. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_constants.h +0 -16
  60. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_contents.cc +0 -42
  61. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_contents.h +0 -60
  62. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_counting_iterator.h +0 -150
  63. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_fetcher.cc +0 -34
  64. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_fetcher.h +0 -37
  65. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_addition.cc +0 -156
  66. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_addition.h +0 -67
  67. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_builder.cc +0 -429
  68. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_builder.h +0 -113
  69. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_cache.cc +0 -101
  70. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_cache.h +0 -56
  71. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_completion_callback.h +0 -84
  72. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_garbage.cc +0 -134
  73. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_garbage.h +0 -57
  74. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_meta.cc +0 -62
  75. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_meta.h +0 -170
  76. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_reader.cc +0 -622
  77. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_reader.h +0 -111
  78. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_garbage_meter.cc +0 -100
  79. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_garbage_meter.h +0 -102
  80. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_index.h +0 -187
  81. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_format.cc +0 -143
  82. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_format.h +0 -164
  83. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_sequential_reader.cc +0 -133
  84. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_sequential_reader.h +0 -83
  85. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_writer.cc +0 -207
  86. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_writer.h +0 -87
  87. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_read_request.h +0 -58
  88. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_source.cc +0 -459
  89. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_source.h +0 -161
  90. package/vendor/librocksdb/vendor/rocksdb/db/blob/prefetch_buffer_collection.cc +0 -23
  91. package/vendor/librocksdb/vendor/rocksdb/db/blob/prefetch_buffer_collection.h +0 -38
  92. package/vendor/librocksdb/vendor/rocksdb/db/builder.cc +0 -517
  93. package/vendor/librocksdb/vendor/rocksdb/db/builder.h +0 -76
  94. package/vendor/librocksdb/vendor/rocksdb/db/c.cc +0 -7133
  95. package/vendor/librocksdb/vendor/rocksdb/db/c_test.c +0 -4052
  96. package/vendor/librocksdb/vendor/rocksdb/db/coalescing_iterator.cc +0 -47
  97. package/vendor/librocksdb/vendor/rocksdb/db/coalescing_iterator.h +0 -79
  98. package/vendor/librocksdb/vendor/rocksdb/db/column_family.cc +0 -1859
  99. package/vendor/librocksdb/vendor/rocksdb/db/column_family.h +0 -918
  100. package/vendor/librocksdb/vendor/rocksdb/db/compaction/clipping_iterator.h +0 -281
  101. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction.cc +0 -995
  102. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction.h +0 -602
  103. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_iteration_stats.h +0 -56
  104. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_iterator.cc +0 -1523
  105. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_iterator.h +0 -557
  106. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_job.cc +0 -2155
  107. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_job.h +0 -520
  108. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_outputs.cc +0 -802
  109. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_outputs.h +0 -411
  110. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker.cc +0 -1245
  111. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker.h +0 -322
  112. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_fifo.cc +0 -478
  113. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_fifo.h +0 -61
  114. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_level.cc +0 -977
  115. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_level.h +0 -32
  116. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_universal.cc +0 -1578
  117. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_universal.h +0 -29
  118. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_service_job.cc +0 -835
  119. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_state.cc +0 -46
  120. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_state.h +0 -42
  121. package/vendor/librocksdb/vendor/rocksdb/db/compaction/file_pri.h +0 -94
  122. package/vendor/librocksdb/vendor/rocksdb/db/compaction/sst_partitioner.cc +0 -83
  123. package/vendor/librocksdb/vendor/rocksdb/db/compaction/subcompaction_state.cc +0 -106
  124. package/vendor/librocksdb/vendor/rocksdb/db/compaction/subcompaction_state.h +0 -220
  125. package/vendor/librocksdb/vendor/rocksdb/db/convenience.cc +0 -101
  126. package/vendor/librocksdb/vendor/rocksdb/db/convenience_impl.h +0 -15
  127. package/vendor/librocksdb/vendor/rocksdb/db/db_filesnapshot.cc +0 -506
  128. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/compacted_db_impl.cc +0 -275
  129. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/compacted_db_impl.h +0 -147
  130. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl.cc +0 -6767
  131. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl.h +0 -3056
  132. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_compaction_flush.cc +0 -4390
  133. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_debug.cc +0 -327
  134. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_experimental.cc +0 -164
  135. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_files.cc +0 -1032
  136. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_follower.cc +0 -348
  137. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_follower.h +0 -54
  138. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_open.cc +0 -2325
  139. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_readonly.cc +0 -376
  140. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_readonly.h +0 -179
  141. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_secondary.cc +0 -1025
  142. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_secondary.h +0 -322
  143. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_write.cc +0 -2624
  144. package/vendor/librocksdb/vendor/rocksdb/db/db_info_dumper.cc +0 -165
  145. package/vendor/librocksdb/vendor/rocksdb/db/db_info_dumper.h +0 -15
  146. package/vendor/librocksdb/vendor/rocksdb/db/db_iter.cc +0 -1774
  147. package/vendor/librocksdb/vendor/rocksdb/db/db_iter.h +0 -444
  148. package/vendor/librocksdb/vendor/rocksdb/db/db_test2.cc +0 -7839
  149. package/vendor/librocksdb/vendor/rocksdb/db/db_test_util.cc +0 -1800
  150. package/vendor/librocksdb/vendor/rocksdb/db/db_test_util.h +0 -1427
  151. package/vendor/librocksdb/vendor/rocksdb/db/db_with_timestamp_test_util.cc +0 -96
  152. package/vendor/librocksdb/vendor/rocksdb/db/db_with_timestamp_test_util.h +0 -126
  153. package/vendor/librocksdb/vendor/rocksdb/db/dbformat.cc +0 -282
  154. package/vendor/librocksdb/vendor/rocksdb/db/dbformat.h +0 -1101
  155. package/vendor/librocksdb/vendor/rocksdb/db/error_handler.cc +0 -806
  156. package/vendor/librocksdb/vendor/rocksdb/db/error_handler.h +0 -149
  157. package/vendor/librocksdb/vendor/rocksdb/db/event_helpers.cc +0 -332
  158. package/vendor/librocksdb/vendor/rocksdb/db/event_helpers.h +0 -78
  159. package/vendor/librocksdb/vendor/rocksdb/db/experimental.cc +0 -1212
  160. package/vendor/librocksdb/vendor/rocksdb/db/external_sst_file_ingestion_job.cc +0 -1249
  161. package/vendor/librocksdb/vendor/rocksdb/db/external_sst_file_ingestion_job.h +0 -268
  162. package/vendor/librocksdb/vendor/rocksdb/db/file_indexer.cc +0 -216
  163. package/vendor/librocksdb/vendor/rocksdb/db/file_indexer.h +0 -140
  164. package/vendor/librocksdb/vendor/rocksdb/db/flush_job.cc +0 -1217
  165. package/vendor/librocksdb/vendor/rocksdb/db/flush_job.h +0 -240
  166. package/vendor/librocksdb/vendor/rocksdb/db/flush_scheduler.cc +0 -86
  167. package/vendor/librocksdb/vendor/rocksdb/db/flush_scheduler.h +0 -55
  168. package/vendor/librocksdb/vendor/rocksdb/db/forward_iterator.cc +0 -1082
  169. package/vendor/librocksdb/vendor/rocksdb/db/forward_iterator.h +0 -166
  170. package/vendor/librocksdb/vendor/rocksdb/db/forward_iterator_bench.cc +0 -378
  171. package/vendor/librocksdb/vendor/rocksdb/db/history_trimming_iterator.h +0 -95
  172. package/vendor/librocksdb/vendor/rocksdb/db/import_column_family_job.cc +0 -463
  173. package/vendor/librocksdb/vendor/rocksdb/db/import_column_family_job.h +0 -91
  174. package/vendor/librocksdb/vendor/rocksdb/db/internal_stats.cc +0 -2198
  175. package/vendor/librocksdb/vendor/rocksdb/db/internal_stats.h +0 -896
  176. package/vendor/librocksdb/vendor/rocksdb/db/job_context.h +0 -254
  177. package/vendor/librocksdb/vendor/rocksdb/db/kv_checksum.h +0 -484
  178. package/vendor/librocksdb/vendor/rocksdb/db/log_format.h +0 -55
  179. package/vendor/librocksdb/vendor/rocksdb/db/log_reader.cc +0 -958
  180. package/vendor/librocksdb/vendor/rocksdb/db/log_reader.h +0 -245
  181. package/vendor/librocksdb/vendor/rocksdb/db/log_writer.cc +0 -355
  182. package/vendor/librocksdb/vendor/rocksdb/db/log_writer.h +0 -151
  183. package/vendor/librocksdb/vendor/rocksdb/db/logs_with_prep_tracker.cc +0 -67
  184. package/vendor/librocksdb/vendor/rocksdb/db/logs_with_prep_tracker.h +0 -62
  185. package/vendor/librocksdb/vendor/rocksdb/db/lookup_key.h +0 -68
  186. package/vendor/librocksdb/vendor/rocksdb/db/malloc_stats.cc +0 -52
  187. package/vendor/librocksdb/vendor/rocksdb/db/malloc_stats.h +0 -22
  188. package/vendor/librocksdb/vendor/rocksdb/db/memtable.cc +0 -1684
  189. package/vendor/librocksdb/vendor/rocksdb/db/memtable.h +0 -712
  190. package/vendor/librocksdb/vendor/rocksdb/db/memtable_list.cc +0 -1028
  191. package/vendor/librocksdb/vendor/rocksdb/db/memtable_list.h +0 -514
  192. package/vendor/librocksdb/vendor/rocksdb/db/merge_context.h +0 -150
  193. package/vendor/librocksdb/vendor/rocksdb/db/merge_helper.cc +0 -699
  194. package/vendor/librocksdb/vendor/rocksdb/db/merge_helper.h +0 -318
  195. package/vendor/librocksdb/vendor/rocksdb/db/merge_operator.cc +0 -167
  196. package/vendor/librocksdb/vendor/rocksdb/db/multi_cf_iterator_impl.h +0 -296
  197. package/vendor/librocksdb/vendor/rocksdb/db/output_validator.cc +0 -29
  198. package/vendor/librocksdb/vendor/rocksdb/db/output_validator.h +0 -45
  199. package/vendor/librocksdb/vendor/rocksdb/db/periodic_task_scheduler.cc +0 -110
  200. package/vendor/librocksdb/vendor/rocksdb/db/periodic_task_scheduler.h +0 -108
  201. package/vendor/librocksdb/vendor/rocksdb/db/pinned_iterators_manager.h +0 -92
  202. package/vendor/librocksdb/vendor/rocksdb/db/post_memtable_callback.h +0 -25
  203. package/vendor/librocksdb/vendor/rocksdb/db/pre_release_callback.h +0 -37
  204. package/vendor/librocksdb/vendor/rocksdb/db/range_del_aggregator.cc +0 -553
  205. package/vendor/librocksdb/vendor/rocksdb/db/range_del_aggregator.h +0 -481
  206. package/vendor/librocksdb/vendor/rocksdb/db/range_del_aggregator_bench.cc +0 -280
  207. package/vendor/librocksdb/vendor/rocksdb/db/range_tombstone_fragmenter.cc +0 -515
  208. package/vendor/librocksdb/vendor/rocksdb/db/range_tombstone_fragmenter.h +0 -361
  209. package/vendor/librocksdb/vendor/rocksdb/db/read_callback.h +0 -54
  210. package/vendor/librocksdb/vendor/rocksdb/db/repair.cc +0 -864
  211. package/vendor/librocksdb/vendor/rocksdb/db/seqno_to_time_mapping.cc +0 -573
  212. package/vendor/librocksdb/vendor/rocksdb/db/seqno_to_time_mapping.h +0 -307
  213. package/vendor/librocksdb/vendor/rocksdb/db/snapshot_checker.h +0 -58
  214. package/vendor/librocksdb/vendor/rocksdb/db/snapshot_impl.cc +0 -25
  215. package/vendor/librocksdb/vendor/rocksdb/db/snapshot_impl.h +0 -239
  216. package/vendor/librocksdb/vendor/rocksdb/db/table_cache.cc +0 -745
  217. package/vendor/librocksdb/vendor/rocksdb/db/table_cache.h +0 -298
  218. package/vendor/librocksdb/vendor/rocksdb/db/table_cache_sync_and_async.h +0 -135
  219. package/vendor/librocksdb/vendor/rocksdb/db/table_properties_collector.cc +0 -74
  220. package/vendor/librocksdb/vendor/rocksdb/db/table_properties_collector.h +0 -185
  221. package/vendor/librocksdb/vendor/rocksdb/db/transaction_log_impl.cc +0 -296
  222. package/vendor/librocksdb/vendor/rocksdb/db/transaction_log_impl.h +0 -128
  223. package/vendor/librocksdb/vendor/rocksdb/db/trim_history_scheduler.cc +0 -54
  224. package/vendor/librocksdb/vendor/rocksdb/db/trim_history_scheduler.h +0 -46
  225. package/vendor/librocksdb/vendor/rocksdb/db/version_builder.cc +0 -1431
  226. package/vendor/librocksdb/vendor/rocksdb/db/version_builder.h +0 -93
  227. package/vendor/librocksdb/vendor/rocksdb/db/version_edit.cc +0 -1119
  228. package/vendor/librocksdb/vendor/rocksdb/db/version_edit.h +0 -769
  229. package/vendor/librocksdb/vendor/rocksdb/db/version_edit_handler.cc +0 -1264
  230. package/vendor/librocksdb/vendor/rocksdb/db/version_edit_handler.h +0 -390
  231. package/vendor/librocksdb/vendor/rocksdb/db/version_set.cc +0 -7562
  232. package/vendor/librocksdb/vendor/rocksdb/db/version_set.h +0 -1799
  233. package/vendor/librocksdb/vendor/rocksdb/db/version_set_sync_and_async.h +0 -169
  234. package/vendor/librocksdb/vendor/rocksdb/db/version_util.h +0 -77
  235. package/vendor/librocksdb/vendor/rocksdb/db/wal_edit.cc +0 -211
  236. package/vendor/librocksdb/vendor/rocksdb/db/wal_edit.h +0 -177
  237. package/vendor/librocksdb/vendor/rocksdb/db/wal_manager.cc +0 -539
  238. package/vendor/librocksdb/vendor/rocksdb/db/wal_manager.h +0 -138
  239. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_column_serialization.cc +0 -166
  240. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_column_serialization.h +0 -57
  241. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_columns.cc +0 -22
  242. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_columns_helper.cc +0 -52
  243. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_columns_helper.h +0 -40
  244. package/vendor/librocksdb/vendor/rocksdb/db/write_batch.cc +0 -3394
  245. package/vendor/librocksdb/vendor/rocksdb/db/write_batch_base.cc +0 -94
  246. package/vendor/librocksdb/vendor/rocksdb/db/write_batch_internal.h +0 -408
  247. package/vendor/librocksdb/vendor/rocksdb/db/write_callback.h +0 -27
  248. package/vendor/librocksdb/vendor/rocksdb/db/write_controller.cc +0 -121
  249. package/vendor/librocksdb/vendor/rocksdb/db/write_controller.h +0 -148
  250. package/vendor/librocksdb/vendor/rocksdb/db/write_stall_stats.cc +0 -179
  251. package/vendor/librocksdb/vendor/rocksdb/db/write_stall_stats.h +0 -47
  252. package/vendor/librocksdb/vendor/rocksdb/db/write_thread.cc +0 -931
  253. package/vendor/librocksdb/vendor/rocksdb/db/write_thread.h +0 -498
  254. package/vendor/librocksdb/vendor/rocksdb/env/composite_env.cc +0 -534
  255. package/vendor/librocksdb/vendor/rocksdb/env/composite_env_wrapper.h +0 -399
  256. package/vendor/librocksdb/vendor/rocksdb/env/emulated_clock.h +0 -114
  257. package/vendor/librocksdb/vendor/rocksdb/env/env.cc +0 -1253
  258. package/vendor/librocksdb/vendor/rocksdb/env/env_chroot.cc +0 -149
  259. package/vendor/librocksdb/vendor/rocksdb/env/env_chroot.h +0 -55
  260. package/vendor/librocksdb/vendor/rocksdb/env/env_encryption.cc +0 -1192
  261. package/vendor/librocksdb/vendor/rocksdb/env/env_encryption_ctr.h +0 -97
  262. package/vendor/librocksdb/vendor/rocksdb/env/env_posix.cc +0 -530
  263. package/vendor/librocksdb/vendor/rocksdb/env/file_system.cc +0 -278
  264. package/vendor/librocksdb/vendor/rocksdb/env/file_system_tracer.cc +0 -564
  265. package/vendor/librocksdb/vendor/rocksdb/env/file_system_tracer.h +0 -461
  266. package/vendor/librocksdb/vendor/rocksdb/env/fs_on_demand.cc +0 -331
  267. package/vendor/librocksdb/vendor/rocksdb/env/fs_on_demand.h +0 -139
  268. package/vendor/librocksdb/vendor/rocksdb/env/fs_posix.cc +0 -1285
  269. package/vendor/librocksdb/vendor/rocksdb/env/fs_readonly.h +0 -105
  270. package/vendor/librocksdb/vendor/rocksdb/env/fs_remap.cc +0 -341
  271. package/vendor/librocksdb/vendor/rocksdb/env/fs_remap.h +0 -137
  272. package/vendor/librocksdb/vendor/rocksdb/env/io_posix.cc +0 -1738
  273. package/vendor/librocksdb/vendor/rocksdb/env/io_posix.h +0 -517
  274. package/vendor/librocksdb/vendor/rocksdb/env/mock_env.cc +0 -1058
  275. package/vendor/librocksdb/vendor/rocksdb/env/mock_env.h +0 -144
  276. package/vendor/librocksdb/vendor/rocksdb/env/unique_id_gen.cc +0 -243
  277. package/vendor/librocksdb/vendor/rocksdb/env/unique_id_gen.h +0 -119
  278. package/vendor/librocksdb/vendor/rocksdb/file/delete_scheduler.cc +0 -513
  279. package/vendor/librocksdb/vendor/rocksdb/file/delete_scheduler.h +0 -200
  280. package/vendor/librocksdb/vendor/rocksdb/file/file_prefetch_buffer.cc +0 -992
  281. package/vendor/librocksdb/vendor/rocksdb/file/file_prefetch_buffer.h +0 -629
  282. package/vendor/librocksdb/vendor/rocksdb/file/file_util.cc +0 -308
  283. package/vendor/librocksdb/vendor/rocksdb/file/file_util.h +0 -123
  284. package/vendor/librocksdb/vendor/rocksdb/file/filename.cc +0 -538
  285. package/vendor/librocksdb/vendor/rocksdb/file/filename.h +0 -186
  286. package/vendor/librocksdb/vendor/rocksdb/file/line_file_reader.cc +0 -73
  287. package/vendor/librocksdb/vendor/rocksdb/file/line_file_reader.h +0 -60
  288. package/vendor/librocksdb/vendor/rocksdb/file/random_access_file_reader.cc +0 -639
  289. package/vendor/librocksdb/vendor/rocksdb/file/random_access_file_reader.h +0 -197
  290. package/vendor/librocksdb/vendor/rocksdb/file/read_write_util.cc +0 -33
  291. package/vendor/librocksdb/vendor/rocksdb/file/read_write_util.h +0 -31
  292. package/vendor/librocksdb/vendor/rocksdb/file/readahead_file_info.h +0 -33
  293. package/vendor/librocksdb/vendor/rocksdb/file/readahead_raf.cc +0 -169
  294. package/vendor/librocksdb/vendor/rocksdb/file/readahead_raf.h +0 -29
  295. package/vendor/librocksdb/vendor/rocksdb/file/sequence_file_reader.cc +0 -324
  296. package/vendor/librocksdb/vendor/rocksdb/file/sequence_file_reader.h +0 -127
  297. package/vendor/librocksdb/vendor/rocksdb/file/sst_file_manager_impl.cc +0 -525
  298. package/vendor/librocksdb/vendor/rocksdb/file/sst_file_manager_impl.h +0 -220
  299. package/vendor/librocksdb/vendor/rocksdb/file/writable_file_writer.cc +0 -1007
  300. package/vendor/librocksdb/vendor/rocksdb/file/writable_file_writer.h +0 -370
  301. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/advanced_cache.h +0 -665
  302. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/advanced_options.h +0 -1101
  303. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/attribute_groups.h +0 -114
  304. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/block_cache_trace_writer.h +0 -149
  305. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/c.h +0 -3122
  306. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/cache.h +0 -579
  307. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/cache_bench_tool.h +0 -14
  308. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/cleanable.h +0 -128
  309. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/compaction_filter.h +0 -374
  310. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/compaction_job_stats.h +0 -112
  311. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/comparator.h +0 -231
  312. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/compression_type.h +0 -186
  313. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/concurrent_task_limiter.h +0 -51
  314. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/configurable.h +0 -390
  315. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/convenience.h +0 -466
  316. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/customizable.h +0 -229
  317. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/data_structure.h +0 -186
  318. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db.h +0 -2174
  319. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db_bench_tool.h +0 -11
  320. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db_dump_tool.h +0 -43
  321. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db_stress_tool.h +0 -11
  322. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/env.h +0 -1920
  323. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/env_encryption.h +0 -363
  324. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/experimental.h +0 -492
  325. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/file_checksum.h +0 -146
  326. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/file_system.h +0 -1961
  327. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/filter_policy.h +0 -211
  328. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/flush_block_policy.h +0 -75
  329. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/functor_wrapper.h +0 -56
  330. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/io_status.h +0 -244
  331. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/iostats_context.h +0 -98
  332. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/iterator.h +0 -104
  333. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/iterator_base.h +0 -90
  334. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/ldb_tool.h +0 -42
  335. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/listener.h +0 -869
  336. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/memory_allocator.h +0 -87
  337. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/memtablerep.h +0 -421
  338. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/merge_operator.h +0 -337
  339. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/metadata.h +0 -258
  340. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/options.h +0 -2339
  341. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/perf_context.h +0 -319
  342. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/perf_level.h +0 -39
  343. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/persistent_cache.h +0 -74
  344. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/port_defs.h +0 -26
  345. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/rate_limiter.h +0 -172
  346. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/rocksdb_namespace.h +0 -16
  347. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/secondary_cache.h +0 -220
  348. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/slice.h +0 -264
  349. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/slice_transform.h +0 -135
  350. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/snapshot.h +0 -53
  351. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_dump_tool.h +0 -17
  352. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_file_manager.h +0 -139
  353. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_file_reader.h +0 -61
  354. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_file_writer.h +0 -203
  355. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_partitioner.h +0 -142
  356. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/statistics.h +0 -794
  357. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/stats_history.h +0 -70
  358. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/status.h +0 -609
  359. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/system_clock.h +0 -129
  360. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/table.h +0 -938
  361. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/table_properties.h +0 -380
  362. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/table_reader_caller.h +0 -41
  363. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/thread_status.h +0 -197
  364. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/threadpool.h +0 -67
  365. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/trace_reader_writer.h +0 -52
  366. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/trace_record.h +0 -248
  367. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/trace_record_result.h +0 -187
  368. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/transaction_log.h +0 -128
  369. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/types.h +0 -113
  370. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/unique_id.h +0 -55
  371. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/universal_compaction.h +0 -127
  372. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/user_write_callback.h +0 -29
  373. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/agg_merge.h +0 -138
  374. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/backup_engine.h +0 -689
  375. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/cache_dump_load.h +0 -144
  376. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/checkpoint.h +0 -65
  377. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/convenience.h +0 -10
  378. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/customizable_util.h +0 -321
  379. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/db_ttl.h +0 -70
  380. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/debug.h +0 -46
  381. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/env_mirror.h +0 -179
  382. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/info_log_finder.h +0 -19
  383. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/ldb_cmd.h +0 -338
  384. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h +0 -75
  385. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/leveldb_options.h +0 -145
  386. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/lua/rocks_lua_custom_library.h +0 -43
  387. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/lua/rocks_lua_util.h +0 -55
  388. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/memory_util.h +0 -48
  389. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/object_registry.h +0 -583
  390. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/optimistic_transaction_db.h +0 -129
  391. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/option_change_migration.h +0 -24
  392. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/options_type.h +0 -1222
  393. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/options_util.h +0 -105
  394. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/replayer.h +0 -85
  395. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/sim_cache.h +0 -92
  396. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/stackable_db.h +0 -593
  397. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/table_properties_collectors.h +0 -133
  398. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/transaction.h +0 -765
  399. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/transaction_db.h +0 -510
  400. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/transaction_db_mutex.h +0 -89
  401. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/types_util.h +0 -36
  402. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/write_batch_with_index.h +0 -402
  403. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/version.h +0 -43
  404. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/wal_filter.h +0 -111
  405. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/wide_columns.h +0 -303
  406. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/write_batch.h +0 -518
  407. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/write_batch_base.h +0 -165
  408. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/write_buffer_manager.h +0 -183
  409. package/vendor/librocksdb/vendor/rocksdb/logging/auto_roll_logger.cc +0 -366
  410. package/vendor/librocksdb/vendor/rocksdb/logging/auto_roll_logger.h +0 -165
  411. package/vendor/librocksdb/vendor/rocksdb/logging/env_logger.h +0 -195
  412. package/vendor/librocksdb/vendor/rocksdb/logging/event_logger.cc +0 -68
  413. package/vendor/librocksdb/vendor/rocksdb/logging/event_logger.h +0 -202
  414. package/vendor/librocksdb/vendor/rocksdb/logging/log_buffer.cc +0 -91
  415. package/vendor/librocksdb/vendor/rocksdb/logging/log_buffer.h +0 -57
  416. package/vendor/librocksdb/vendor/rocksdb/logging/logging.h +0 -62
  417. package/vendor/librocksdb/vendor/rocksdb/memory/allocator.h +0 -58
  418. package/vendor/librocksdb/vendor/rocksdb/memory/arena.cc +0 -170
  419. package/vendor/librocksdb/vendor/rocksdb/memory/arena.h +0 -146
  420. package/vendor/librocksdb/vendor/rocksdb/memory/concurrent_arena.cc +0 -45
  421. package/vendor/librocksdb/vendor/rocksdb/memory/concurrent_arena.h +0 -215
  422. package/vendor/librocksdb/vendor/rocksdb/memory/jemalloc_nodump_allocator.cc +0 -304
  423. package/vendor/librocksdb/vendor/rocksdb/memory/jemalloc_nodump_allocator.h +0 -99
  424. package/vendor/librocksdb/vendor/rocksdb/memory/memkind_kmem_allocator.cc +0 -44
  425. package/vendor/librocksdb/vendor/rocksdb/memory/memkind_kmem_allocator.h +0 -43
  426. package/vendor/librocksdb/vendor/rocksdb/memory/memory_allocator.cc +0 -81
  427. package/vendor/librocksdb/vendor/rocksdb/memory/memory_allocator_impl.h +0 -47
  428. package/vendor/librocksdb/vendor/rocksdb/memory/memory_usage.h +0 -38
  429. package/vendor/librocksdb/vendor/rocksdb/memtable/alloc_tracker.cc +0 -63
  430. package/vendor/librocksdb/vendor/rocksdb/memtable/hash_linklist_rep.cc +0 -925
  431. package/vendor/librocksdb/vendor/rocksdb/memtable/hash_skiplist_rep.cc +0 -392
  432. package/vendor/librocksdb/vendor/rocksdb/memtable/inlineskiplist.h +0 -1051
  433. package/vendor/librocksdb/vendor/rocksdb/memtable/memtablerep_bench.cc +0 -687
  434. package/vendor/librocksdb/vendor/rocksdb/memtable/skiplist.h +0 -498
  435. package/vendor/librocksdb/vendor/rocksdb/memtable/skiplistrep.cc +0 -368
  436. package/vendor/librocksdb/vendor/rocksdb/memtable/stl_wrappers.h +0 -33
  437. package/vendor/librocksdb/vendor/rocksdb/memtable/vectorrep.cc +0 -307
  438. package/vendor/librocksdb/vendor/rocksdb/memtable/write_buffer_manager.cc +0 -185
  439. package/vendor/librocksdb/vendor/rocksdb/monitoring/file_read_sample.h +0 -23
  440. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram.cc +0 -280
  441. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram.h +0 -143
  442. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram_windowing.cc +0 -198
  443. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram_windowing.h +0 -84
  444. package/vendor/librocksdb/vendor/rocksdb/monitoring/in_memory_stats_history.cc +0 -50
  445. package/vendor/librocksdb/vendor/rocksdb/monitoring/in_memory_stats_history.h +0 -74
  446. package/vendor/librocksdb/vendor/rocksdb/monitoring/instrumented_mutex.cc +0 -90
  447. package/vendor/librocksdb/vendor/rocksdb/monitoring/instrumented_mutex.h +0 -126
  448. package/vendor/librocksdb/vendor/rocksdb/monitoring/iostats_context.cc +0 -78
  449. package/vendor/librocksdb/vendor/rocksdb/monitoring/iostats_context_imp.h +0 -62
  450. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_context.cc +0 -317
  451. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_context_imp.h +0 -103
  452. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_level.cc +0 -23
  453. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_level_imp.h +0 -14
  454. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_step_timer.h +0 -77
  455. package/vendor/librocksdb/vendor/rocksdb/monitoring/persistent_stats_history.cc +0 -173
  456. package/vendor/librocksdb/vendor/rocksdb/monitoring/persistent_stats_history.h +0 -83
  457. package/vendor/librocksdb/vendor/rocksdb/monitoring/statistics.cc +0 -561
  458. package/vendor/librocksdb/vendor/rocksdb/monitoring/statistics_impl.h +0 -143
  459. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_impl.cc +0 -163
  460. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_updater.cc +0 -328
  461. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_updater.h +0 -226
  462. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_updater_debug.cc +0 -43
  463. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_util.cc +0 -214
  464. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_util.h +0 -139
  465. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_util_debug.cc +0 -60
  466. package/vendor/librocksdb/vendor/rocksdb/options/cf_options.cc +0 -1218
  467. package/vendor/librocksdb/vendor/rocksdb/options/cf_options.h +0 -352
  468. package/vendor/librocksdb/vendor/rocksdb/options/configurable.cc +0 -720
  469. package/vendor/librocksdb/vendor/rocksdb/options/configurable_helper.h +0 -185
  470. package/vendor/librocksdb/vendor/rocksdb/options/configurable_test.h +0 -116
  471. package/vendor/librocksdb/vendor/rocksdb/options/customizable.cc +0 -133
  472. package/vendor/librocksdb/vendor/rocksdb/options/db_options.cc +0 -1113
  473. package/vendor/librocksdb/vendor/rocksdb/options/db_options.h +0 -160
  474. package/vendor/librocksdb/vendor/rocksdb/options/offpeak_time_info.cc +0 -59
  475. package/vendor/librocksdb/vendor/rocksdb/options/offpeak_time_info.h +0 -37
  476. package/vendor/librocksdb/vendor/rocksdb/options/options.cc +0 -717
  477. package/vendor/librocksdb/vendor/rocksdb/options/options_helper.cc +0 -1438
  478. package/vendor/librocksdb/vendor/rocksdb/options/options_helper.h +0 -115
  479. package/vendor/librocksdb/vendor/rocksdb/options/options_parser.cc +0 -745
  480. package/vendor/librocksdb/vendor/rocksdb/options/options_parser.h +0 -151
  481. package/vendor/librocksdb/vendor/rocksdb/port/jemalloc_helper.h +0 -107
  482. package/vendor/librocksdb/vendor/rocksdb/port/lang.h +0 -97
  483. package/vendor/librocksdb/vendor/rocksdb/port/likely.h +0 -18
  484. package/vendor/librocksdb/vendor/rocksdb/port/malloc.h +0 -17
  485. package/vendor/librocksdb/vendor/rocksdb/port/mmap.cc +0 -98
  486. package/vendor/librocksdb/vendor/rocksdb/port/mmap.h +0 -90
  487. package/vendor/librocksdb/vendor/rocksdb/port/port.h +0 -21
  488. package/vendor/librocksdb/vendor/rocksdb/port/port_dirent.h +0 -44
  489. package/vendor/librocksdb/vendor/rocksdb/port/port_example.h +0 -101
  490. package/vendor/librocksdb/vendor/rocksdb/port/port_posix.cc +0 -300
  491. package/vendor/librocksdb/vendor/rocksdb/port/port_posix.h +0 -246
  492. package/vendor/librocksdb/vendor/rocksdb/port/stack_trace.cc +0 -418
  493. package/vendor/librocksdb/vendor/rocksdb/port/stack_trace.h +0 -31
  494. package/vendor/librocksdb/vendor/rocksdb/port/sys_time.h +0 -63
  495. package/vendor/librocksdb/vendor/rocksdb/port/util_logger.h +0 -18
  496. package/vendor/librocksdb/vendor/rocksdb/port/win/env_default.cc +0 -45
  497. package/vendor/librocksdb/vendor/rocksdb/port/win/env_win.cc +0 -1436
  498. package/vendor/librocksdb/vendor/rocksdb/port/win/env_win.h +0 -305
  499. package/vendor/librocksdb/vendor/rocksdb/port/win/io_win.cc +0 -1101
  500. package/vendor/librocksdb/vendor/rocksdb/port/win/io_win.h +0 -504
  501. package/vendor/librocksdb/vendor/rocksdb/port/win/port_win.cc +0 -305
  502. package/vendor/librocksdb/vendor/rocksdb/port/win/port_win.h +0 -382
  503. package/vendor/librocksdb/vendor/rocksdb/port/win/win_jemalloc.cc +0 -80
  504. package/vendor/librocksdb/vendor/rocksdb/port/win/win_logger.cc +0 -192
  505. package/vendor/librocksdb/vendor/rocksdb/port/win/win_logger.h +0 -64
  506. package/vendor/librocksdb/vendor/rocksdb/port/win/win_thread.cc +0 -170
  507. package/vendor/librocksdb/vendor/rocksdb/port/win/win_thread.h +0 -117
  508. package/vendor/librocksdb/vendor/rocksdb/port/win/xpress_win.cc +0 -210
  509. package/vendor/librocksdb/vendor/rocksdb/port/win/xpress_win.h +0 -26
  510. package/vendor/librocksdb/vendor/rocksdb/port/xpress.h +0 -17
  511. package/vendor/librocksdb/vendor/rocksdb/rocksdb.pc.in +0 -10
  512. package/vendor/librocksdb/vendor/rocksdb/table/adaptive/adaptive_table_factory.cc +0 -119
  513. package/vendor/librocksdb/vendor/rocksdb/table/adaptive/adaptive_table_factory.h +0 -56
  514. package/vendor/librocksdb/vendor/rocksdb/table/block_based/binary_search_index_reader.cc +0 -73
  515. package/vendor/librocksdb/vendor/rocksdb/table/block_based/binary_search_index_reader.h +0 -48
  516. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block.cc +0 -1341
  517. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block.h +0 -969
  518. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_builder.cc +0 -2148
  519. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_builder.h +0 -208
  520. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_factory.cc +0 -980
  521. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_factory.h +0 -102
  522. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_iterator.cc +0 -893
  523. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_iterator.h +0 -445
  524. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader.cc +0 -3296
  525. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader.h +0 -785
  526. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader_impl.h +0 -205
  527. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader_sync_and_async.h +0 -819
  528. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_builder.cc +0 -266
  529. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_builder.h +0 -128
  530. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_cache.cc +0 -108
  531. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_cache.h +0 -190
  532. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefetcher.cc +0 -158
  533. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefetcher.h +0 -74
  534. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefix_index.cc +0 -226
  535. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefix_index.h +0 -70
  536. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_type.h +0 -34
  537. package/vendor/librocksdb/vendor/rocksdb/table/block_based/cachable_entry.h +0 -249
  538. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_footer.cc +0 -59
  539. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_footer.h +0 -25
  540. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_hash_index.cc +0 -94
  541. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_hash_index.h +0 -137
  542. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_block.h +0 -189
  543. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_block_reader_common.cc +0 -169
  544. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_block_reader_common.h +0 -79
  545. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_policy.cc +0 -1989
  546. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_policy_internal.h +0 -341
  547. package/vendor/librocksdb/vendor/rocksdb/table/block_based/flush_block_policy.cc +0 -132
  548. package/vendor/librocksdb/vendor/rocksdb/table/block_based/flush_block_policy_impl.h +0 -40
  549. package/vendor/librocksdb/vendor/rocksdb/table/block_based/full_filter_block.cc +0 -297
  550. package/vendor/librocksdb/vendor/rocksdb/table/block_based/full_filter_block.h +0 -142
  551. package/vendor/librocksdb/vendor/rocksdb/table/block_based/hash_index_reader.cc +0 -146
  552. package/vendor/librocksdb/vendor/rocksdb/table/block_based/hash_index_reader.h +0 -49
  553. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_builder.cc +0 -305
  554. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_builder.h +0 -534
  555. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_reader_common.cc +0 -62
  556. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_reader_common.h +0 -94
  557. package/vendor/librocksdb/vendor/rocksdb/table/block_based/mock_block_based_table.h +0 -62
  558. package/vendor/librocksdb/vendor/rocksdb/table/block_based/parsed_full_filter_block.cc +0 -23
  559. package/vendor/librocksdb/vendor/rocksdb/table/block_based/parsed_full_filter_block.h +0 -47
  560. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_filter_block.cc +0 -610
  561. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_filter_block.h +0 -188
  562. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_iterator.cc +0 -164
  563. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_iterator.h +0 -160
  564. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_reader.cc +0 -264
  565. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_reader.h +0 -58
  566. package/vendor/librocksdb/vendor/rocksdb/table/block_based/reader_common.cc +0 -64
  567. package/vendor/librocksdb/vendor/rocksdb/table/block_based/reader_common.h +0 -36
  568. package/vendor/librocksdb/vendor/rocksdb/table/block_based/uncompression_dict_reader.cc +0 -118
  569. package/vendor/librocksdb/vendor/rocksdb/table/block_based/uncompression_dict_reader.h +0 -60
  570. package/vendor/librocksdb/vendor/rocksdb/table/block_fetcher.cc +0 -458
  571. package/vendor/librocksdb/vendor/rocksdb/table/block_fetcher.h +0 -168
  572. package/vendor/librocksdb/vendor/rocksdb/table/compaction_merging_iterator.cc +0 -370
  573. package/vendor/librocksdb/vendor/rocksdb/table/compaction_merging_iterator.h +0 -45
  574. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_builder.cc +0 -555
  575. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_builder.h +0 -136
  576. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_factory.cc +0 -100
  577. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_factory.h +0 -80
  578. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_reader.cc +0 -416
  579. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_reader.h +0 -100
  580. package/vendor/librocksdb/vendor/rocksdb/table/format.cc +0 -708
  581. package/vendor/librocksdb/vendor/rocksdb/table/format.h +0 -439
  582. package/vendor/librocksdb/vendor/rocksdb/table/get_context.cc +0 -622
  583. package/vendor/librocksdb/vendor/rocksdb/table/get_context.h +0 -259
  584. package/vendor/librocksdb/vendor/rocksdb/table/internal_iterator.h +0 -242
  585. package/vendor/librocksdb/vendor/rocksdb/table/iter_heap.h +0 -44
  586. package/vendor/librocksdb/vendor/rocksdb/table/iterator.cc +0 -134
  587. package/vendor/librocksdb/vendor/rocksdb/table/iterator_wrapper.h +0 -225
  588. package/vendor/librocksdb/vendor/rocksdb/table/merging_iterator.cc +0 -1755
  589. package/vendor/librocksdb/vendor/rocksdb/table/merging_iterator.h +0 -100
  590. package/vendor/librocksdb/vendor/rocksdb/table/meta_blocks.cc +0 -590
  591. package/vendor/librocksdb/vendor/rocksdb/table/meta_blocks.h +0 -181
  592. package/vendor/librocksdb/vendor/rocksdb/table/mock_table.cc +0 -355
  593. package/vendor/librocksdb/vendor/rocksdb/table/mock_table.h +0 -92
  594. package/vendor/librocksdb/vendor/rocksdb/table/multiget_context.h +0 -405
  595. package/vendor/librocksdb/vendor/rocksdb/table/persistent_cache_helper.cc +0 -110
  596. package/vendor/librocksdb/vendor/rocksdb/table/persistent_cache_helper.h +0 -46
  597. package/vendor/librocksdb/vendor/rocksdb/table/persistent_cache_options.h +0 -34
  598. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_bloom.cc +0 -78
  599. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_bloom.h +0 -132
  600. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_builder.cc +0 -348
  601. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_builder.h +0 -151
  602. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_factory.cc +0 -295
  603. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_factory.h +0 -180
  604. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_index.cc +0 -211
  605. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_index.h +0 -246
  606. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_key_coding.cc +0 -508
  607. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_key_coding.h +0 -199
  608. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_reader.cc +0 -778
  609. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_reader.h +0 -243
  610. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_dumper.cc +0 -601
  611. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_dumper.h +0 -104
  612. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_reader.cc +0 -166
  613. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_writer.cc +0 -536
  614. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_writer_collectors.h +0 -97
  615. package/vendor/librocksdb/vendor/rocksdb/table/table_builder.h +0 -239
  616. package/vendor/librocksdb/vendor/rocksdb/table/table_factory.cc +0 -52
  617. package/vendor/librocksdb/vendor/rocksdb/table/table_iterator.h +0 -69
  618. package/vendor/librocksdb/vendor/rocksdb/table/table_properties.cc +0 -357
  619. package/vendor/librocksdb/vendor/rocksdb/table/table_properties_internal.h +0 -14
  620. package/vendor/librocksdb/vendor/rocksdb/table/table_reader.h +0 -202
  621. package/vendor/librocksdb/vendor/rocksdb/table/table_reader_bench.cc +0 -341
  622. package/vendor/librocksdb/vendor/rocksdb/table/two_level_iterator.cc +0 -222
  623. package/vendor/librocksdb/vendor/rocksdb/table/two_level_iterator.h +0 -43
  624. package/vendor/librocksdb/vendor/rocksdb/table/unique_id.cc +0 -223
  625. package/vendor/librocksdb/vendor/rocksdb/table/unique_id_impl.h +0 -93
  626. package/vendor/librocksdb/vendor/rocksdb/test_util/mock_time_env.cc +0 -38
  627. package/vendor/librocksdb/vendor/rocksdb/test_util/mock_time_env.h +0 -109
  628. package/vendor/librocksdb/vendor/rocksdb/test_util/secondary_cache_test_util.cc +0 -93
  629. package/vendor/librocksdb/vendor/rocksdb/test_util/secondary_cache_test_util.h +0 -131
  630. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point.cc +0 -82
  631. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point.h +0 -182
  632. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point_impl.cc +0 -152
  633. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point_impl.h +0 -96
  634. package/vendor/librocksdb/vendor/rocksdb/test_util/testharness.cc +0 -105
  635. package/vendor/librocksdb/vendor/rocksdb/test_util/testharness.h +0 -124
  636. package/vendor/librocksdb/vendor/rocksdb/test_util/testutil.cc +0 -776
  637. package/vendor/librocksdb/vendor/rocksdb/test_util/testutil.h +0 -908
  638. package/vendor/librocksdb/vendor/rocksdb/test_util/transaction_test_util.cc +0 -400
  639. package/vendor/librocksdb/vendor/rocksdb/test_util/transaction_test_util.h +0 -147
  640. package/vendor/librocksdb/vendor/rocksdb/tools/CMakeLists.txt +0 -30
  641. package/vendor/librocksdb/vendor/rocksdb/tools/blob_dump.cc +0 -103
  642. package/vendor/librocksdb/vendor/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.cc +0 -2331
  643. package/vendor/librocksdb/vendor/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.h +0 -398
  644. package/vendor/librocksdb/vendor/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer_tool.cc +0 -17
  645. package/vendor/librocksdb/vendor/rocksdb/tools/db_bench.cc +0 -21
  646. package/vendor/librocksdb/vendor/rocksdb/tools/db_bench_tool.cc +0 -8743
  647. package/vendor/librocksdb/vendor/rocksdb/tools/db_repl_stress.cc +0 -132
  648. package/vendor/librocksdb/vendor/rocksdb/tools/dump/db_dump_tool.cc +0 -264
  649. package/vendor/librocksdb/vendor/rocksdb/tools/dump/rocksdb_dump.cc +0 -60
  650. package/vendor/librocksdb/vendor/rocksdb/tools/dump/rocksdb_undump.cc +0 -59
  651. package/vendor/librocksdb/vendor/rocksdb/tools/io_tracer_parser.cc +0 -17
  652. package/vendor/librocksdb/vendor/rocksdb/tools/io_tracer_parser_tool.cc +0 -142
  653. package/vendor/librocksdb/vendor/rocksdb/tools/io_tracer_parser_tool.h +0 -38
  654. package/vendor/librocksdb/vendor/rocksdb/tools/ldb.cc +0 -13
  655. package/vendor/librocksdb/vendor/rocksdb/tools/ldb_cmd.cc +0 -5044
  656. package/vendor/librocksdb/vendor/rocksdb/tools/ldb_cmd_impl.h +0 -814
  657. package/vendor/librocksdb/vendor/rocksdb/tools/ldb_tool.cc +0 -192
  658. package/vendor/librocksdb/vendor/rocksdb/tools/simulated_hybrid_file_system.cc +0 -244
  659. package/vendor/librocksdb/vendor/rocksdb/tools/simulated_hybrid_file_system.h +0 -124
  660. package/vendor/librocksdb/vendor/rocksdb/tools/sst_dump.cc +0 -12
  661. package/vendor/librocksdb/vendor/rocksdb/tools/sst_dump_tool.cc +0 -588
  662. package/vendor/librocksdb/vendor/rocksdb/tools/trace_analyzer.cc +0 -17
  663. package/vendor/librocksdb/vendor/rocksdb/tools/trace_analyzer_tool.cc +0 -1935
  664. package/vendor/librocksdb/vendor/rocksdb/tools/trace_analyzer_tool.h +0 -329
  665. package/vendor/librocksdb/vendor/rocksdb/tools/write_stress.cc +0 -305
  666. package/vendor/librocksdb/vendor/rocksdb/trace_replay/block_cache_tracer.cc +0 -509
  667. package/vendor/librocksdb/vendor/rocksdb/trace_replay/block_cache_tracer.h +0 -239
  668. package/vendor/librocksdb/vendor/rocksdb/trace_replay/io_tracer.cc +0 -303
  669. package/vendor/librocksdb/vendor/rocksdb/trace_replay/io_tracer.h +0 -185
  670. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record.cc +0 -206
  671. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record_handler.cc +0 -190
  672. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record_handler.h +0 -46
  673. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record_result.cc +0 -146
  674. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_replay.cc +0 -632
  675. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_replay.h +0 -184
  676. package/vendor/librocksdb/vendor/rocksdb/util/aligned_buffer.h +0 -235
  677. package/vendor/librocksdb/vendor/rocksdb/util/aligned_storage.h +0 -24
  678. package/vendor/librocksdb/vendor/rocksdb/util/async_file_reader.cc +0 -84
  679. package/vendor/librocksdb/vendor/rocksdb/util/async_file_reader.h +0 -144
  680. package/vendor/librocksdb/vendor/rocksdb/util/atomic.h +0 -111
  681. package/vendor/librocksdb/vendor/rocksdb/util/autovector.h +0 -397
  682. package/vendor/librocksdb/vendor/rocksdb/util/bloom_impl.h +0 -489
  683. package/vendor/librocksdb/vendor/rocksdb/util/build_version.cc.in +0 -79
  684. package/vendor/librocksdb/vendor/rocksdb/util/cast_util.h +0 -88
  685. package/vendor/librocksdb/vendor/rocksdb/util/channel.h +0 -69
  686. package/vendor/librocksdb/vendor/rocksdb/util/cleanable.cc +0 -181
  687. package/vendor/librocksdb/vendor/rocksdb/util/coding.cc +0 -90
  688. package/vendor/librocksdb/vendor/rocksdb/util/coding.h +0 -385
  689. package/vendor/librocksdb/vendor/rocksdb/util/coding_lean.h +0 -101
  690. package/vendor/librocksdb/vendor/rocksdb/util/compaction_job_stats_impl.cc +0 -94
  691. package/vendor/librocksdb/vendor/rocksdb/util/comparator.cc +0 -443
  692. package/vendor/librocksdb/vendor/rocksdb/util/compression.cc +0 -122
  693. package/vendor/librocksdb/vendor/rocksdb/util/compression.h +0 -1879
  694. package/vendor/librocksdb/vendor/rocksdb/util/compression_context_cache.cc +0 -106
  695. package/vendor/librocksdb/vendor/rocksdb/util/compression_context_cache.h +0 -47
  696. package/vendor/librocksdb/vendor/rocksdb/util/concurrent_task_limiter_impl.cc +0 -64
  697. package/vendor/librocksdb/vendor/rocksdb/util/concurrent_task_limiter_impl.h +0 -67
  698. package/vendor/librocksdb/vendor/rocksdb/util/core_local.h +0 -85
  699. package/vendor/librocksdb/vendor/rocksdb/util/coro_utils.h +0 -112
  700. package/vendor/librocksdb/vendor/rocksdb/util/crc32c.cc +0 -1295
  701. package/vendor/librocksdb/vendor/rocksdb/util/crc32c.h +0 -56
  702. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_arm64.cc +0 -213
  703. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_arm64.h +0 -51
  704. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc.c +0 -94
  705. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc.h +0 -21
  706. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc_asm.S +0 -756
  707. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc_constants.h +0 -900
  708. package/vendor/librocksdb/vendor/rocksdb/util/data_structure.cc +0 -16
  709. package/vendor/librocksdb/vendor/rocksdb/util/defer.h +0 -82
  710. package/vendor/librocksdb/vendor/rocksdb/util/distributed_mutex.h +0 -50
  711. package/vendor/librocksdb/vendor/rocksdb/util/duplicate_detector.h +0 -69
  712. package/vendor/librocksdb/vendor/rocksdb/util/dynamic_bloom.cc +0 -70
  713. package/vendor/librocksdb/vendor/rocksdb/util/dynamic_bloom.h +0 -214
  714. package/vendor/librocksdb/vendor/rocksdb/util/fastrange.h +0 -114
  715. package/vendor/librocksdb/vendor/rocksdb/util/file_checksum_helper.cc +0 -170
  716. package/vendor/librocksdb/vendor/rocksdb/util/file_checksum_helper.h +0 -101
  717. package/vendor/librocksdb/vendor/rocksdb/util/filter_bench.cc +0 -840
  718. package/vendor/librocksdb/vendor/rocksdb/util/gflags_compat.h +0 -29
  719. package/vendor/librocksdb/vendor/rocksdb/util/hash.cc +0 -201
  720. package/vendor/librocksdb/vendor/rocksdb/util/hash.h +0 -141
  721. package/vendor/librocksdb/vendor/rocksdb/util/hash128.h +0 -26
  722. package/vendor/librocksdb/vendor/rocksdb/util/hash_containers.h +0 -51
  723. package/vendor/librocksdb/vendor/rocksdb/util/hash_map.h +0 -67
  724. package/vendor/librocksdb/vendor/rocksdb/util/heap.h +0 -174
  725. package/vendor/librocksdb/vendor/rocksdb/util/kv_map.h +0 -33
  726. package/vendor/librocksdb/vendor/rocksdb/util/log_write_bench.cc +0 -88
  727. package/vendor/librocksdb/vendor/rocksdb/util/math.h +0 -351
  728. package/vendor/librocksdb/vendor/rocksdb/util/math128.h +0 -338
  729. package/vendor/librocksdb/vendor/rocksdb/util/murmurhash.cc +0 -196
  730. package/vendor/librocksdb/vendor/rocksdb/util/murmurhash.h +0 -43
  731. package/vendor/librocksdb/vendor/rocksdb/util/mutexlock.h +0 -189
  732. package/vendor/librocksdb/vendor/rocksdb/util/overload.h +0 -23
  733. package/vendor/librocksdb/vendor/rocksdb/util/ppc-opcode.h +0 -27
  734. package/vendor/librocksdb/vendor/rocksdb/util/random.cc +0 -63
  735. package/vendor/librocksdb/vendor/rocksdb/util/random.h +0 -190
  736. package/vendor/librocksdb/vendor/rocksdb/util/rate_limiter.cc +0 -391
  737. package/vendor/librocksdb/vendor/rocksdb/util/rate_limiter_impl.h +0 -156
  738. package/vendor/librocksdb/vendor/rocksdb/util/repeatable_thread.h +0 -149
  739. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_alg.h +0 -1225
  740. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_config.cc +0 -498
  741. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_config.h +0 -182
  742. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_impl.h +0 -1137
  743. package/vendor/librocksdb/vendor/rocksdb/util/set_comparator.h +0 -24
  744. package/vendor/librocksdb/vendor/rocksdb/util/single_thread_executor.h +0 -57
  745. package/vendor/librocksdb/vendor/rocksdb/util/slice.cc +0 -366
  746. package/vendor/librocksdb/vendor/rocksdb/util/status.cc +0 -163
  747. package/vendor/librocksdb/vendor/rocksdb/util/stderr_logger.cc +0 -62
  748. package/vendor/librocksdb/vendor/rocksdb/util/stderr_logger.h +0 -41
  749. package/vendor/librocksdb/vendor/rocksdb/util/stop_watch.h +0 -136
  750. package/vendor/librocksdb/vendor/rocksdb/util/string_util.cc +0 -554
  751. package/vendor/librocksdb/vendor/rocksdb/util/string_util.h +0 -185
  752. package/vendor/librocksdb/vendor/rocksdb/util/thread_guard.h +0 -41
  753. package/vendor/librocksdb/vendor/rocksdb/util/thread_local.cc +0 -521
  754. package/vendor/librocksdb/vendor/rocksdb/util/thread_local.h +0 -100
  755. package/vendor/librocksdb/vendor/rocksdb/util/thread_operation.h +0 -122
  756. package/vendor/librocksdb/vendor/rocksdb/util/threadpool_imp.cc +0 -550
  757. package/vendor/librocksdb/vendor/rocksdb/util/threadpool_imp.h +0 -120
  758. package/vendor/librocksdb/vendor/rocksdb/util/timer.h +0 -340
  759. package/vendor/librocksdb/vendor/rocksdb/util/timer_queue.h +0 -231
  760. package/vendor/librocksdb/vendor/rocksdb/util/udt_util.cc +0 -418
  761. package/vendor/librocksdb/vendor/rocksdb/util/udt_util.h +0 -275
  762. package/vendor/librocksdb/vendor/rocksdb/util/user_comparator_wrapper.h +0 -64
  763. package/vendor/librocksdb/vendor/rocksdb/util/vector_iterator.h +0 -114
  764. package/vendor/librocksdb/vendor/rocksdb/util/work_queue.h +0 -150
  765. package/vendor/librocksdb/vendor/rocksdb/util/write_batch_util.cc +0 -25
  766. package/vendor/librocksdb/vendor/rocksdb/util/write_batch_util.h +0 -90
  767. package/vendor/librocksdb/vendor/rocksdb/util/xxhash.cc +0 -48
  768. package/vendor/librocksdb/vendor/rocksdb/util/xxhash.h +0 -6364
  769. package/vendor/librocksdb/vendor/rocksdb/util/xxph3.h +0 -1760
  770. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/agg_merge.cc +0 -237
  771. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/agg_merge_impl.h +0 -49
  772. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/test_agg_merge.cc +0 -103
  773. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/test_agg_merge.h +0 -47
  774. package/vendor/librocksdb/vendor/rocksdb/utilities/backup/backup_engine.cc +0 -3357
  775. package/vendor/librocksdb/vendor/rocksdb/utilities/backup/backup_engine_impl.h +0 -34
  776. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_compaction_filter.cc +0 -490
  777. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_compaction_filter.h +0 -202
  778. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db.cc +0 -109
  779. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db.h +0 -231
  780. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_gc_stats.h +0 -54
  781. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_impl.cc +0 -2269
  782. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_impl.h +0 -514
  783. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_impl_filesnapshot.cc +0 -127
  784. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_iterator.h +0 -148
  785. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_listener.h +0 -71
  786. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_dump_tool.cc +0 -276
  787. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_dump_tool.h +0 -56
  788. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_file.cc +0 -311
  789. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_file.h +0 -245
  790. package/vendor/librocksdb/vendor/rocksdb/utilities/cache_dump_load.cc +0 -67
  791. package/vendor/librocksdb/vendor/rocksdb/utilities/cache_dump_load_impl.cc +0 -389
  792. package/vendor/librocksdb/vendor/rocksdb/utilities/cache_dump_load_impl.h +0 -368
  793. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/cassandra_compaction_filter.cc +0 -104
  794. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/cassandra_compaction_filter.h +0 -57
  795. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/cassandra_options.h +0 -41
  796. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/format.cc +0 -365
  797. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/format.h +0 -183
  798. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/merge_operator.cc +0 -76
  799. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/merge_operator.h +0 -43
  800. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/serialize.h +0 -81
  801. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/test_utils.cc +0 -67
  802. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/test_utils.h +0 -42
  803. package/vendor/librocksdb/vendor/rocksdb/utilities/checkpoint/checkpoint_impl.cc +0 -472
  804. package/vendor/librocksdb/vendor/rocksdb/utilities/checkpoint/checkpoint_impl.h +0 -64
  805. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters/layered_compaction_filter_base.h +0 -41
  806. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc +0 -24
  807. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.h +0 -26
  808. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters.cc +0 -52
  809. package/vendor/librocksdb/vendor/rocksdb/utilities/convenience/info_log_finder.cc +0 -26
  810. package/vendor/librocksdb/vendor/rocksdb/utilities/counted_fs.cc +0 -379
  811. package/vendor/librocksdb/vendor/rocksdb/utilities/counted_fs.h +0 -158
  812. package/vendor/librocksdb/vendor/rocksdb/utilities/debug.cc +0 -134
  813. package/vendor/librocksdb/vendor/rocksdb/utilities/env_mirror.cc +0 -280
  814. package/vendor/librocksdb/vendor/rocksdb/utilities/env_timed.cc +0 -181
  815. package/vendor/librocksdb/vendor/rocksdb/utilities/env_timed.h +0 -95
  816. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_env.cc +0 -555
  817. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_env.h +0 -252
  818. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_fs.cc +0 -1507
  819. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_fs.h +0 -760
  820. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_secondary_cache.cc +0 -138
  821. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_secondary_cache.h +0 -115
  822. package/vendor/librocksdb/vendor/rocksdb/utilities/leveldb_options/leveldb_options.cc +0 -57
  823. package/vendor/librocksdb/vendor/rocksdb/utilities/memory/memory_util.cc +0 -50
  824. package/vendor/librocksdb/vendor/rocksdb/utilities/memory_allocators.h +0 -103
  825. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/bytesxor.cc +0 -57
  826. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/bytesxor.h +0 -39
  827. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/max.cc +0 -64
  828. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/max_operator.h +0 -35
  829. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/put.cc +0 -74
  830. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/put_operator.h +0 -56
  831. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/sortlist.cc +0 -97
  832. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/sortlist.h +0 -42
  833. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend.cc +0 -76
  834. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend.h +0 -32
  835. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend2.cc +0 -129
  836. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend2.h +0 -51
  837. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/uint64add.cc +0 -56
  838. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/uint64add.h +0 -35
  839. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators.cc +0 -115
  840. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators.h +0 -36
  841. package/vendor/librocksdb/vendor/rocksdb/utilities/object_registry.cc +0 -381
  842. package/vendor/librocksdb/vendor/rocksdb/utilities/option_change_migration/option_change_migration.cc +0 -169
  843. package/vendor/librocksdb/vendor/rocksdb/utilities/options/options_util.cc +0 -117
  844. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier.cc +0 -420
  845. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier.h +0 -154
  846. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc +0 -607
  847. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_file.h +0 -291
  848. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_file_buffer.h +0 -127
  849. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.cc +0 -84
  850. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.h +0 -122
  851. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/hash_table.h +0 -237
  852. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/hash_table_bench.cc +0 -310
  853. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/hash_table_evictable.h +0 -166
  854. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/lrulist.h +0 -172
  855. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_bench.cc +0 -355
  856. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_test.h +0 -284
  857. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_tier.cc +0 -165
  858. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_tier.h +0 -340
  859. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_util.h +0 -67
  860. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc +0 -138
  861. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/volatile_tier_impl.h +0 -139
  862. package/vendor/librocksdb/vendor/rocksdb/utilities/simulator_cache/cache_simulator.cc +0 -287
  863. package/vendor/librocksdb/vendor/rocksdb/utilities/simulator_cache/cache_simulator.h +0 -231
  864. package/vendor/librocksdb/vendor/rocksdb/utilities/simulator_cache/sim_cache.cc +0 -375
  865. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_for_tiering_collector.cc +0 -144
  866. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_for_tiering_collector.h +0 -45
  867. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.cc +0 -233
  868. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.h +0 -65
  869. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/file_trace_reader_writer.cc +0 -132
  870. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/file_trace_reader_writer.h +0 -48
  871. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/replayer_impl.cc +0 -313
  872. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/replayer_impl.h +0 -84
  873. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/lock_manager.cc +0 -27
  874. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/lock_manager.h +0 -80
  875. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/lock_tracker.h +0 -207
  876. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_manager.cc +0 -718
  877. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_manager.h +0 -222
  878. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_manager_test.h +0 -324
  879. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_tracker.cc +0 -255
  880. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_tracker.h +0 -97
  881. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_lock_manager.h +0 -34
  882. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/db.h +0 -81
  883. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/ft/comparator.h +0 -138
  884. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/ft/ft-status.h +0 -102
  885. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/concurrent_tree.cc +0 -137
  886. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/concurrent_tree.h +0 -174
  887. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/keyrange.cc +0 -220
  888. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/keyrange.h +0 -141
  889. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.cc +0 -525
  890. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.h +0 -255
  891. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/locktree.cc +0 -1021
  892. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/locktree.h +0 -580
  893. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/manager.cc +0 -525
  894. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/range_buffer.cc +0 -263
  895. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/range_buffer.h +0 -178
  896. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/treenode.cc +0 -518
  897. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/treenode.h +0 -302
  898. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/txnid_set.cc +0 -118
  899. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/txnid_set.h +0 -92
  900. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/wfg.cc +0 -211
  901. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/wfg.h +0 -124
  902. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/memory.h +0 -215
  903. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_assert_subst.h +0 -43
  904. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h +0 -130
  905. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_external_pthread.h +0 -87
  906. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_instrumentation.h +0 -286
  907. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_portability.h +0 -87
  908. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_pthread.h +0 -520
  909. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_race_tools.h +0 -179
  910. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +0 -197
  911. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/txn_subst.h +0 -31
  912. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/standalone_port.cc +0 -139
  913. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/dbt.cc +0 -165
  914. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/dbt.h +0 -98
  915. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/growable_array.h +0 -144
  916. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/memarena.cc +0 -199
  917. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/memarena.h +0 -141
  918. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/omt.h +0 -794
  919. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/omt_impl.h +0 -1295
  920. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/partitioned_counter.h +0 -165
  921. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/status.h +0 -76
  922. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc +0 -501
  923. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.h +0 -135
  924. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_tracker.cc +0 -156
  925. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_tracker.h +0 -146
  926. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction.cc +0 -208
  927. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction.h +0 -99
  928. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction_db_impl.cc +0 -111
  929. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction_db_impl.h +0 -110
  930. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction.cc +0 -1278
  931. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction.h +0 -345
  932. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction_db.cc +0 -845
  933. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction_db.h +0 -345
  934. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/snapshot_checker.cc +0 -37
  935. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_base.cc +0 -912
  936. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_base.h +0 -455
  937. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_db_mutex_impl.cc +0 -133
  938. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_db_mutex_impl.h +0 -24
  939. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_test.h +0 -589
  940. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_util.cc +0 -207
  941. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_util.h +0 -86
  942. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn.cc +0 -548
  943. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn.h +0 -118
  944. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn_db.cc +0 -1100
  945. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn_db.h +0 -1149
  946. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn.cc +0 -1089
  947. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn.h +0 -333
  948. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn_db.cc +0 -486
  949. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn_db.h +0 -105
  950. package/vendor/librocksdb/vendor/rocksdb/utilities/ttl/db_ttl_impl.cc +0 -638
  951. package/vendor/librocksdb/vendor/rocksdb/utilities/ttl/db_ttl_impl.h +0 -239
  952. package/vendor/librocksdb/vendor/rocksdb/utilities/types_util.cc +0 -88
  953. package/vendor/librocksdb/vendor/rocksdb/utilities/wal_filter.cc +0 -22
  954. package/vendor/librocksdb/vendor/rocksdb/utilities/write_batch_with_index/write_batch_with_index.cc +0 -1134
  955. package/vendor/librocksdb/vendor/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.cc +0 -934
  956. package/vendor/librocksdb/vendor/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.h +0 -468
@@ -1,3056 +0,0 @@
1
- // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
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
- // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
7
- // Use of this source code is governed by a BSD-style license that can be
8
- // found in the LICENSE file. See the AUTHORS file for names of contributors.
9
- #pragma once
10
-
11
- #include <atomic>
12
- #include <cstdint>
13
- #include <deque>
14
- #include <functional>
15
- #include <limits>
16
- #include <list>
17
- #include <map>
18
- #include <set>
19
- #include <string>
20
- #include <unordered_map>
21
- #include <utility>
22
- #include <vector>
23
-
24
- #include "db/column_family.h"
25
- #include "db/compaction/compaction_iterator.h"
26
- #include "db/compaction/compaction_job.h"
27
- #include "db/error_handler.h"
28
- #include "db/event_helpers.h"
29
- #include "db/external_sst_file_ingestion_job.h"
30
- #include "db/flush_job.h"
31
- #include "db/flush_scheduler.h"
32
- #include "db/import_column_family_job.h"
33
- #include "db/internal_stats.h"
34
- #include "db/log_writer.h"
35
- #include "db/logs_with_prep_tracker.h"
36
- #include "db/memtable_list.h"
37
- #include "db/periodic_task_scheduler.h"
38
- #include "db/post_memtable_callback.h"
39
- #include "db/pre_release_callback.h"
40
- #include "db/range_del_aggregator.h"
41
- #include "db/read_callback.h"
42
- #include "db/seqno_to_time_mapping.h"
43
- #include "db/snapshot_checker.h"
44
- #include "db/snapshot_impl.h"
45
- #include "db/trim_history_scheduler.h"
46
- #include "db/version_edit.h"
47
- #include "db/wal_manager.h"
48
- #include "db/write_controller.h"
49
- #include "db/write_thread.h"
50
- #include "logging/event_logger.h"
51
- #include "monitoring/instrumented_mutex.h"
52
- #include "options/db_options.h"
53
- #include "port/port.h"
54
- #include "rocksdb/attribute_groups.h"
55
- #include "rocksdb/db.h"
56
- #include "rocksdb/env.h"
57
- #include "rocksdb/memtablerep.h"
58
- #include "rocksdb/status.h"
59
- #include "rocksdb/trace_reader_writer.h"
60
- #include "rocksdb/transaction_log.h"
61
- #include "rocksdb/user_write_callback.h"
62
- #include "rocksdb/utilities/replayer.h"
63
- #include "rocksdb/write_buffer_manager.h"
64
- #include "table/merging_iterator.h"
65
- #include "util/autovector.h"
66
- #include "util/hash.h"
67
- #include "util/repeatable_thread.h"
68
- #include "util/stop_watch.h"
69
- #include "util/thread_local.h"
70
-
71
- namespace ROCKSDB_NAMESPACE {
72
-
73
- class Arena;
74
- class ArenaWrappedDBIter;
75
- class InMemoryStatsHistoryIterator;
76
- class MemTable;
77
- class PersistentStatsHistoryIterator;
78
- class TableCache;
79
- class TaskLimiterToken;
80
- class Version;
81
- class VersionEdit;
82
- class VersionSet;
83
- class WriteCallback;
84
- struct JobContext;
85
- struct ExternalSstFileInfo;
86
- struct MemTableInfo;
87
-
88
- // Class to maintain directories for all database paths other than main one.
89
- class Directories {
90
- public:
91
- IOStatus SetDirectories(FileSystem* fs, const std::string& dbname,
92
- const std::string& wal_dir,
93
- const std::vector<DbPath>& data_paths);
94
-
95
- FSDirectory* GetDataDir(size_t path_id) const {
96
- assert(path_id < data_dirs_.size());
97
- FSDirectory* ret_dir = data_dirs_[path_id].get();
98
- if (ret_dir == nullptr) {
99
- // Should use db_dir_
100
- return db_dir_.get();
101
- }
102
- return ret_dir;
103
- }
104
-
105
- FSDirectory* GetWalDir() {
106
- if (wal_dir_) {
107
- return wal_dir_.get();
108
- }
109
- return db_dir_.get();
110
- }
111
-
112
- FSDirectory* GetDbDir() { return db_dir_.get(); }
113
-
114
- IOStatus Close(const IOOptions& options, IODebugContext* dbg) {
115
- // close all directories for all database paths
116
- IOStatus s = IOStatus::OK();
117
-
118
- // The default implementation for Close() in Directory/FSDirectory class
119
- // "NotSupported" status, the upper level interface should be able to
120
- // handle this error so that Close() does not fail after upgrading when
121
- // run on FileSystems that have not implemented `Directory::Close()` or
122
- // `FSDirectory::Close()` yet
123
-
124
- if (db_dir_) {
125
- IOStatus temp_s = db_dir_->Close(options, dbg);
126
- if (!temp_s.ok() && !temp_s.IsNotSupported() && s.ok()) {
127
- s = std::move(temp_s);
128
- }
129
- }
130
-
131
- // Attempt to close everything even if one fails
132
- s.PermitUncheckedError();
133
-
134
- if (wal_dir_) {
135
- IOStatus temp_s = wal_dir_->Close(options, dbg);
136
- if (!temp_s.ok() && !temp_s.IsNotSupported() && s.ok()) {
137
- s = std::move(temp_s);
138
- }
139
- }
140
-
141
- s.PermitUncheckedError();
142
-
143
- for (auto& data_dir_ptr : data_dirs_) {
144
- if (data_dir_ptr) {
145
- IOStatus temp_s = data_dir_ptr->Close(options, dbg);
146
- if (!temp_s.ok() && !temp_s.IsNotSupported() && s.ok()) {
147
- s = std::move(temp_s);
148
- }
149
- }
150
- }
151
-
152
- // Ready for caller
153
- s.MustCheck();
154
- return s;
155
- }
156
-
157
- private:
158
- std::unique_ptr<FSDirectory> db_dir_;
159
- std::vector<std::unique_ptr<FSDirectory>> data_dirs_;
160
- std::unique_ptr<FSDirectory> wal_dir_;
161
- };
162
-
163
- // While DB is the public interface of RocksDB, and DBImpl is the actual
164
- // class implementing it. It's the entrance of the core RocksdB engine.
165
- // All other DB implementations, e.g. TransactionDB, BlobDB, etc, wrap a
166
- // DBImpl internally.
167
- // Other than functions implementing the DB interface, some public
168
- // functions are there for other internal components to call. For
169
- // example, TransactionDB directly calls DBImpl::WriteImpl() and
170
- // BlobDB directly calls DBImpl::GetImpl(). Some other functions
171
- // are for sub-components to call. For example, ColumnFamilyHandleImpl
172
- // calls DBImpl::FindObsoleteFiles().
173
- //
174
- // Since it's a very large class, the definition of the functions is
175
- // divided in several db_impl_*.cc files, besides db_impl.cc.
176
- class DBImpl : public DB {
177
- public:
178
- DBImpl(const DBOptions& options, const std::string& dbname,
179
- const bool seq_per_batch = false, const bool batch_per_txn = true,
180
- bool read_only = false);
181
- // No copying allowed
182
- DBImpl(const DBImpl&) = delete;
183
- void operator=(const DBImpl&) = delete;
184
-
185
- virtual ~DBImpl();
186
-
187
- // ---- Implementations of the DB interface ----
188
-
189
- using DB::Resume;
190
- Status Resume() override;
191
-
192
- using DB::Put;
193
- Status Put(const WriteOptions& options, ColumnFamilyHandle* column_family,
194
- const Slice& key, const Slice& value) override;
195
- Status Put(const WriteOptions& options, ColumnFamilyHandle* column_family,
196
- const Slice& key, const Slice& ts, const Slice& value) override;
197
-
198
- using DB::PutEntity;
199
- Status PutEntity(const WriteOptions& options,
200
- ColumnFamilyHandle* column_family, const Slice& key,
201
- const WideColumns& columns) override;
202
- Status PutEntity(const WriteOptions& options, const Slice& key,
203
- const AttributeGroups& attribute_groups) override;
204
-
205
- using DB::Merge;
206
- Status Merge(const WriteOptions& options, ColumnFamilyHandle* column_family,
207
- const Slice& key, const Slice& value) override;
208
- Status Merge(const WriteOptions& options, ColumnFamilyHandle* column_family,
209
- const Slice& key, const Slice& ts, const Slice& value) override;
210
-
211
- using DB::Delete;
212
- Status Delete(const WriteOptions& options, ColumnFamilyHandle* column_family,
213
- const Slice& key) override;
214
- Status Delete(const WriteOptions& options, ColumnFamilyHandle* column_family,
215
- const Slice& key, const Slice& ts) override;
216
-
217
- using DB::SingleDelete;
218
- Status SingleDelete(const WriteOptions& options,
219
- ColumnFamilyHandle* column_family,
220
- const Slice& key) override;
221
- Status SingleDelete(const WriteOptions& options,
222
- ColumnFamilyHandle* column_family, const Slice& key,
223
- const Slice& ts) override;
224
-
225
- using DB::DeleteRange;
226
- Status DeleteRange(const WriteOptions& options,
227
- ColumnFamilyHandle* column_family, const Slice& begin_key,
228
- const Slice& end_key) override;
229
- Status DeleteRange(const WriteOptions& options,
230
- ColumnFamilyHandle* column_family, const Slice& begin_key,
231
- const Slice& end_key, const Slice& ts) override;
232
-
233
- using DB::Write;
234
- Status Write(const WriteOptions& options, WriteBatch* updates) override;
235
-
236
- using DB::WriteWithCallback;
237
- Status WriteWithCallback(const WriteOptions& options, WriteBatch* updates,
238
- UserWriteCallback* user_write_cb) override;
239
-
240
- using DB::Get;
241
- Status Get(const ReadOptions& _read_options,
242
- ColumnFamilyHandle* column_family, const Slice& key,
243
- PinnableSlice* value, std::string* timestamp) override;
244
-
245
- using DB::GetEntity;
246
- Status GetEntity(const ReadOptions& options,
247
- ColumnFamilyHandle* column_family, const Slice& key,
248
- PinnableWideColumns* columns) override;
249
- Status GetEntity(const ReadOptions& options, const Slice& key,
250
- PinnableAttributeGroups* result) override;
251
-
252
- using DB::GetMergeOperands;
253
- Status GetMergeOperands(const ReadOptions& options,
254
- ColumnFamilyHandle* column_family, const Slice& key,
255
- PinnableSlice* merge_operands,
256
- GetMergeOperandsOptions* get_merge_operands_options,
257
- int* number_of_operands) override {
258
- GetImplOptions get_impl_options;
259
- get_impl_options.column_family = column_family;
260
- get_impl_options.merge_operands = merge_operands;
261
- get_impl_options.get_merge_operands_options = get_merge_operands_options;
262
- get_impl_options.number_of_operands = number_of_operands;
263
- get_impl_options.get_value = false;
264
- return GetImpl(options, key, get_impl_options);
265
- }
266
-
267
- using DB::MultiGet;
268
- // This MultiGet is a batched version, which may be faster than calling Get
269
- // multiple times, especially if the keys have some spatial locality that
270
- // enables them to be queried in the same SST files/set of files. The larger
271
- // the batch size, the more scope for batching and performance improvement
272
- // The values and statuses parameters are arrays with number of elements
273
- // equal to keys.size(). This allows the storage for those to be alloacted
274
- // by the caller on the stack for small batches
275
- void MultiGet(const ReadOptions& _read_options, const size_t num_keys,
276
- ColumnFamilyHandle** column_families, const Slice* keys,
277
- PinnableSlice* values, std::string* timestamps,
278
- Status* statuses, const bool sorted_input = false) override;
279
-
280
- void MultiGetWithCallback(
281
- const ReadOptions& _read_options, ColumnFamilyHandle* column_family,
282
- ReadCallback* callback,
283
- autovector<KeyContext*, MultiGetContext::MAX_BATCH_SIZE>* sorted_keys);
284
-
285
- using DB::MultiGetEntity;
286
-
287
- void MultiGetEntity(const ReadOptions& options,
288
- ColumnFamilyHandle* column_family, size_t num_keys,
289
- const Slice* keys, PinnableWideColumns* results,
290
- Status* statuses, bool sorted_input) override;
291
-
292
- void MultiGetEntity(const ReadOptions& options, size_t num_keys,
293
- ColumnFamilyHandle** column_families, const Slice* keys,
294
- PinnableWideColumns* results, Status* statuses,
295
- bool sorted_input) override;
296
- void MultiGetEntity(const ReadOptions& options, size_t num_keys,
297
- const Slice* keys,
298
- PinnableAttributeGroups* results) override;
299
-
300
- void MultiGetEntityWithCallback(
301
- const ReadOptions& read_options, ColumnFamilyHandle* column_family,
302
- ReadCallback* callback,
303
- autovector<KeyContext*, MultiGetContext::MAX_BATCH_SIZE>* sorted_keys);
304
-
305
- Status CreateColumnFamily(const ColumnFamilyOptions& cf_options,
306
- const std::string& column_family,
307
- ColumnFamilyHandle** handle) override {
308
- // TODO: plumb Env::IOActivity, Env::IOPriority
309
- return CreateColumnFamily(ReadOptions(), WriteOptions(), cf_options,
310
- column_family, handle);
311
- }
312
- virtual Status CreateColumnFamily(const ReadOptions& read_options,
313
- const WriteOptions& write_options,
314
- const ColumnFamilyOptions& cf_options,
315
- const std::string& column_family,
316
- ColumnFamilyHandle** handle);
317
- Status CreateColumnFamilies(
318
- const ColumnFamilyOptions& cf_options,
319
- const std::vector<std::string>& column_family_names,
320
- std::vector<ColumnFamilyHandle*>* handles) override {
321
- // TODO: plumb Env::IOActivity, Env::IOPriority
322
- return CreateColumnFamilies(ReadOptions(), WriteOptions(), cf_options,
323
- column_family_names, handles);
324
- }
325
- virtual Status CreateColumnFamilies(
326
- const ReadOptions& read_options, const WriteOptions& write_options,
327
- const ColumnFamilyOptions& cf_options,
328
- const std::vector<std::string>& column_family_names,
329
- std::vector<ColumnFamilyHandle*>* handles);
330
-
331
- Status CreateColumnFamilies(
332
- const std::vector<ColumnFamilyDescriptor>& column_families,
333
- std::vector<ColumnFamilyHandle*>* handles) override {
334
- // TODO: plumb Env::IOActivity, Env::IOPriority
335
- return CreateColumnFamilies(ReadOptions(), WriteOptions(), column_families,
336
- handles);
337
- }
338
- virtual Status CreateColumnFamilies(
339
- const ReadOptions& read_options, const WriteOptions& write_options,
340
- const std::vector<ColumnFamilyDescriptor>& column_families,
341
- std::vector<ColumnFamilyHandle*>* handles);
342
- Status DropColumnFamily(ColumnFamilyHandle* column_family) override;
343
- Status DropColumnFamilies(
344
- const std::vector<ColumnFamilyHandle*>& column_families) override;
345
-
346
- // Returns false if key doesn't exist in the database and true if it may.
347
- // If value_found is not passed in as null, then return the value if found in
348
- // memory. On return, if value was found, then value_found will be set to true
349
- // , otherwise false.
350
- using DB::KeyMayExist;
351
- bool KeyMayExist(const ReadOptions& options,
352
- ColumnFamilyHandle* column_family, const Slice& key,
353
- std::string* value, std::string* timestamp,
354
- bool* value_found = nullptr) override;
355
-
356
- using DB::NewIterator;
357
- Iterator* NewIterator(const ReadOptions& _read_options,
358
- ColumnFamilyHandle* column_family) override;
359
- Status NewIterators(const ReadOptions& _read_options,
360
- const std::vector<ColumnFamilyHandle*>& column_families,
361
- std::vector<Iterator*>* iterators) override;
362
-
363
- const Snapshot* GetSnapshot() override;
364
- void ReleaseSnapshot(const Snapshot* snapshot) override;
365
-
366
- // EXPERIMENTAL
367
- std::unique_ptr<Iterator> NewCoalescingIterator(
368
- const ReadOptions& options,
369
- const std::vector<ColumnFamilyHandle*>& column_families) override;
370
-
371
- // EXPERIMENTAL
372
- std::unique_ptr<AttributeGroupIterator> NewAttributeGroupIterator(
373
- const ReadOptions& options,
374
- const std::vector<ColumnFamilyHandle*>& column_families) override;
375
-
376
- // Create a timestamped snapshot. This snapshot can be shared by multiple
377
- // readers. If any of them uses it for write conflict checking, then
378
- // is_write_conflict_boundary is true. For simplicity, set it to true by
379
- // default.
380
- std::pair<Status, std::shared_ptr<const Snapshot>> CreateTimestampedSnapshot(
381
- SequenceNumber snapshot_seq, uint64_t ts);
382
- std::shared_ptr<const SnapshotImpl> GetTimestampedSnapshot(uint64_t ts) const;
383
- void ReleaseTimestampedSnapshotsOlderThan(
384
- uint64_t ts, size_t* remaining_total_ss = nullptr);
385
- Status GetTimestampedSnapshots(uint64_t ts_lb, uint64_t ts_ub,
386
- std::vector<std::shared_ptr<const Snapshot>>&
387
- timestamped_snapshots) const;
388
-
389
- using DB::GetProperty;
390
- bool GetProperty(ColumnFamilyHandle* column_family, const Slice& property,
391
- std::string* value) override;
392
- using DB::GetMapProperty;
393
- bool GetMapProperty(ColumnFamilyHandle* column_family, const Slice& property,
394
- std::map<std::string, std::string>* value) override;
395
- using DB::GetIntProperty;
396
- bool GetIntProperty(ColumnFamilyHandle* column_family, const Slice& property,
397
- uint64_t* value) override;
398
- using DB::GetAggregatedIntProperty;
399
- bool GetAggregatedIntProperty(const Slice& property,
400
- uint64_t* aggregated_value) override;
401
- using DB::GetApproximateSizes;
402
- Status GetApproximateSizes(const SizeApproximationOptions& options,
403
- ColumnFamilyHandle* column_family,
404
- const Range* range, int n,
405
- uint64_t* sizes) override;
406
- using DB::GetApproximateMemTableStats;
407
- void GetApproximateMemTableStats(ColumnFamilyHandle* column_family,
408
- const Range& range, uint64_t* const count,
409
- uint64_t* const size) override;
410
- using DB::CompactRange;
411
- Status CompactRange(const CompactRangeOptions& options,
412
- ColumnFamilyHandle* column_family, const Slice* begin,
413
- const Slice* end) override;
414
-
415
- using DB::CompactFiles;
416
- Status CompactFiles(
417
- const CompactionOptions& compact_options,
418
- ColumnFamilyHandle* column_family,
419
- const std::vector<std::string>& input_file_names, const int output_level,
420
- const int output_path_id = -1,
421
- std::vector<std::string>* const output_file_names = nullptr,
422
- CompactionJobInfo* compaction_job_info = nullptr) override;
423
-
424
- Status PauseBackgroundWork() override;
425
- Status ContinueBackgroundWork() override;
426
-
427
- Status EnableAutoCompaction(
428
- const std::vector<ColumnFamilyHandle*>& column_family_handles) override;
429
-
430
- void EnableManualCompaction() override;
431
- void DisableManualCompaction() override;
432
-
433
- using DB::SetOptions;
434
- Status SetOptions(
435
- ColumnFamilyHandle* column_family,
436
- const std::unordered_map<std::string, std::string>& options_map) override;
437
-
438
- Status SetDBOptions(
439
- const std::unordered_map<std::string, std::string>& options_map) override;
440
-
441
- using DB::NumberLevels;
442
- int NumberLevels(ColumnFamilyHandle* column_family) override;
443
- using DB::MaxMemCompactionLevel;
444
- int MaxMemCompactionLevel(ColumnFamilyHandle* column_family) override;
445
- using DB::Level0StopWriteTrigger;
446
- int Level0StopWriteTrigger(ColumnFamilyHandle* column_family) override;
447
- const std::string& GetName() const override;
448
- Env* GetEnv() const override;
449
- FileSystem* GetFileSystem() const override;
450
- using DB::GetOptions;
451
- Options GetOptions(ColumnFamilyHandle* column_family) const override;
452
- using DB::GetDBOptions;
453
- DBOptions GetDBOptions() const override;
454
- using DB::Flush;
455
- Status Flush(const FlushOptions& options,
456
- ColumnFamilyHandle* column_family) override;
457
- Status Flush(
458
- const FlushOptions& options,
459
- const std::vector<ColumnFamilyHandle*>& column_families) override;
460
- Status FlushWAL(bool sync) override {
461
- // TODO: plumb Env::IOActivity, Env::IOPriority
462
- return FlushWAL(WriteOptions(), sync);
463
- }
464
-
465
- virtual Status FlushWAL(const WriteOptions& write_options, bool sync);
466
- bool WALBufferIsEmpty();
467
- Status SyncWAL() override;
468
- Status LockWAL() override;
469
- Status UnlockWAL() override;
470
-
471
- SequenceNumber GetLatestSequenceNumber() const override;
472
-
473
- // IncreaseFullHistoryTsLow(ColumnFamilyHandle*, std::string) will acquire
474
- // and release db_mutex
475
- Status IncreaseFullHistoryTsLow(ColumnFamilyHandle* column_family,
476
- std::string ts_low) override;
477
-
478
- // GetFullHistoryTsLow(ColumnFamilyHandle*, std::string*) will acquire and
479
- // release db_mutex
480
- Status GetFullHistoryTsLow(ColumnFamilyHandle* column_family,
481
- std::string* ts_low) override;
482
-
483
- Status GetDbIdentity(std::string& identity) const override;
484
-
485
- virtual Status GetDbIdentityFromIdentityFile(std::string* identity) const;
486
-
487
- Status GetDbSessionId(std::string& session_id) const override;
488
-
489
- ColumnFamilyHandle* DefaultColumnFamily() const override;
490
-
491
- ColumnFamilyHandle* PersistentStatsColumnFamily() const;
492
-
493
- Status Close() override;
494
-
495
- Status DisableFileDeletions() override;
496
-
497
- Status EnableFileDeletions() override;
498
-
499
- virtual bool IsFileDeletionsEnabled() const;
500
-
501
- Status GetStatsHistory(
502
- uint64_t start_time, uint64_t end_time,
503
- std::unique_ptr<StatsHistoryIterator>* stats_iterator) override;
504
-
505
- using DB::ResetStats;
506
- Status ResetStats() override;
507
- // All the returned filenames start with "/"
508
- Status GetLiveFiles(std::vector<std::string>&, uint64_t* manifest_file_size,
509
- bool flush_memtable = true) override;
510
- Status GetSortedWalFiles(VectorWalPtr& files) override;
511
- Status GetSortedWalFilesImpl(VectorWalPtr& files, bool need_seqnos);
512
-
513
- // Get the known flushed sizes of WALs that might still be written to
514
- // or have pending sync.
515
- // NOTE: unlike alive_log_files_, this function includes WALs that might
516
- // be obsolete (but not obsolete to a pending Checkpoint) and not yet fully
517
- // synced.
518
- Status GetOpenWalSizes(std::map<uint64_t, uint64_t>& number_to_size);
519
- Status GetCurrentWalFile(std::unique_ptr<WalFile>* current_log_file) override;
520
- Status GetCreationTimeOfOldestFile(uint64_t* creation_time) override;
521
-
522
- Status GetUpdatesSince(
523
- SequenceNumber seq_number, std::unique_ptr<TransactionLogIterator>* iter,
524
- const TransactionLogIterator::ReadOptions& read_options =
525
- TransactionLogIterator::ReadOptions()) override;
526
- Status DeleteFile(std::string name) override;
527
- Status DeleteFilesInRanges(ColumnFamilyHandle* column_family,
528
- const RangePtr* ranges, size_t n,
529
- bool include_end = true);
530
-
531
- void GetLiveFilesMetaData(std::vector<LiveFileMetaData>* metadata) override;
532
-
533
- Status GetLiveFilesChecksumInfo(FileChecksumList* checksum_list) override;
534
-
535
- Status GetLiveFilesStorageInfo(
536
- const LiveFilesStorageInfoOptions& opts,
537
- std::vector<LiveFileStorageInfo>* files) override;
538
-
539
- // Obtains the meta data of the specified column family of the DB.
540
- // TODO(yhchiang): output parameter is placed in the end in this codebase.
541
- void GetColumnFamilyMetaData(ColumnFamilyHandle* column_family,
542
- ColumnFamilyMetaData* metadata) override;
543
-
544
- void GetAllColumnFamilyMetaData(
545
- std::vector<ColumnFamilyMetaData>* metadata) override;
546
-
547
- Status SuggestCompactRange(ColumnFamilyHandle* column_family,
548
- const Slice* begin, const Slice* end) override;
549
-
550
- Status PromoteL0(ColumnFamilyHandle* column_family,
551
- int target_level) override;
552
-
553
- using DB::IngestExternalFile;
554
- Status IngestExternalFile(
555
- ColumnFamilyHandle* column_family,
556
- const std::vector<std::string>& external_files,
557
- const IngestExternalFileOptions& ingestion_options) override;
558
-
559
- using DB::IngestExternalFiles;
560
- Status IngestExternalFiles(
561
- const std::vector<IngestExternalFileArg>& args) override;
562
-
563
- using DB::CreateColumnFamilyWithImport;
564
- Status CreateColumnFamilyWithImport(
565
- const ColumnFamilyOptions& options, const std::string& column_family_name,
566
- const ImportColumnFamilyOptions& import_options,
567
- const std::vector<const ExportImportFilesMetaData*>& metadatas,
568
- ColumnFamilyHandle** handle) override;
569
-
570
- using DB::ClipColumnFamily;
571
- Status ClipColumnFamily(ColumnFamilyHandle* column_family,
572
- const Slice& begin_key,
573
- const Slice& end_key) override;
574
-
575
- using DB::VerifyFileChecksums;
576
- Status VerifyFileChecksums(const ReadOptions& read_options) override;
577
-
578
- using DB::VerifyChecksum;
579
- Status VerifyChecksum(const ReadOptions& /*read_options*/) override;
580
- // Verify the checksums of files in db. Currently only tables are checked.
581
- //
582
- // read_options: controls file I/O behavior, e.g. read ahead size while
583
- // reading all the live table files.
584
- //
585
- // use_file_checksum: if false, verify the block checksums of all live table
586
- // in db. Otherwise, obtain the file checksums and compare
587
- // with the MANIFEST. Currently, file checksums are
588
- // recomputed by reading all table files.
589
- //
590
- // Returns: OK if there is no file whose file or block checksum mismatches.
591
- Status VerifyChecksumInternal(const ReadOptions& read_options,
592
- bool use_file_checksum);
593
-
594
- Status VerifyFullFileChecksum(const std::string& file_checksum_expected,
595
- const std::string& func_name_expected,
596
- const std::string& fpath,
597
- const ReadOptions& read_options);
598
-
599
- using DB::StartTrace;
600
- Status StartTrace(const TraceOptions& options,
601
- std::unique_ptr<TraceWriter>&& trace_writer) override;
602
-
603
- using DB::EndTrace;
604
- Status EndTrace() override;
605
-
606
- using DB::NewDefaultReplayer;
607
- Status NewDefaultReplayer(const std::vector<ColumnFamilyHandle*>& handles,
608
- std::unique_ptr<TraceReader>&& reader,
609
- std::unique_ptr<Replayer>* replayer) override;
610
-
611
- using DB::StartBlockCacheTrace;
612
- Status StartBlockCacheTrace(
613
- const TraceOptions& trace_options,
614
- std::unique_ptr<TraceWriter>&& trace_writer) override;
615
-
616
- Status StartBlockCacheTrace(
617
- const BlockCacheTraceOptions& options,
618
- std::unique_ptr<BlockCacheTraceWriter>&& trace_writer) override;
619
-
620
- using DB::EndBlockCacheTrace;
621
- Status EndBlockCacheTrace() override;
622
-
623
- using DB::StartIOTrace;
624
- Status StartIOTrace(const TraceOptions& options,
625
- std::unique_ptr<TraceWriter>&& trace_writer) override;
626
-
627
- using DB::EndIOTrace;
628
- Status EndIOTrace() override;
629
-
630
- using DB::GetPropertiesOfAllTables;
631
- Status GetPropertiesOfAllTables(ColumnFamilyHandle* column_family,
632
- TablePropertiesCollection* props) override;
633
- Status GetPropertiesOfTablesInRange(
634
- ColumnFamilyHandle* column_family, const Range* range, std::size_t n,
635
- TablePropertiesCollection* props) override;
636
-
637
- // ---- End of implementations of the DB interface ----
638
- SystemClock* GetSystemClock() const;
639
-
640
- struct GetImplOptions {
641
- ColumnFamilyHandle* column_family = nullptr;
642
- PinnableSlice* value = nullptr;
643
- PinnableWideColumns* columns = nullptr;
644
- std::string* timestamp = nullptr;
645
- bool* value_found = nullptr;
646
- ReadCallback* callback = nullptr;
647
- bool* is_blob_index = nullptr;
648
- // If true return value associated with key via value pointer else return
649
- // all merge operands for key via merge_operands pointer
650
- bool get_value = true;
651
- // Pointer to an array of size
652
- // get_merge_operands_options.expected_max_number_of_operands allocated by
653
- // user
654
- PinnableSlice* merge_operands = nullptr;
655
- GetMergeOperandsOptions* get_merge_operands_options = nullptr;
656
- int* number_of_operands = nullptr;
657
- };
658
-
659
- Status GetImpl(const ReadOptions& read_options,
660
- ColumnFamilyHandle* column_family, const Slice& key,
661
- PinnableSlice* value);
662
-
663
- Status GetImpl(const ReadOptions& read_options,
664
- ColumnFamilyHandle* column_family, const Slice& key,
665
- PinnableSlice* value, std::string* timestamp);
666
-
667
- // Function that Get and KeyMayExist call with no_io true or false
668
- // Note: 'value_found' from KeyMayExist propagates here
669
- // This function is also called by GetMergeOperands
670
- // If get_impl_options.get_value = true get value associated with
671
- // get_impl_options.key via get_impl_options.value
672
- // If get_impl_options.get_value = false get merge operands associated with
673
- // get_impl_options.key via get_impl_options.merge_operands
674
- virtual Status GetImpl(const ReadOptions& options, const Slice& key,
675
- GetImplOptions& get_impl_options);
676
-
677
- // If `snapshot` == kMaxSequenceNumber, set a recent one inside the file.
678
- ArenaWrappedDBIter* NewIteratorImpl(const ReadOptions& options,
679
- ColumnFamilyHandleImpl* cfh,
680
- SuperVersion* sv, SequenceNumber snapshot,
681
- ReadCallback* read_callback,
682
- bool expose_blob_index = false,
683
- bool allow_refresh = true);
684
-
685
- virtual SequenceNumber GetLastPublishedSequence() const {
686
- if (last_seq_same_as_publish_seq_) {
687
- return versions_->LastSequence();
688
- } else {
689
- return versions_->LastPublishedSequence();
690
- }
691
- }
692
-
693
- // REQUIRES: joined the main write queue if two_write_queues is disabled, and
694
- // the second write queue otherwise.
695
- virtual void SetLastPublishedSequence(SequenceNumber seq);
696
- // Returns LastSequence in last_seq_same_as_publish_seq_
697
- // mode and LastAllocatedSequence otherwise. This is useful when visiblility
698
- // depends also on data written to the WAL but not to the memtable.
699
- SequenceNumber TEST_GetLastVisibleSequence() const;
700
-
701
- // Similar to Write() but will call the callback once on the single write
702
- // thread to determine whether it is safe to perform the write.
703
- virtual Status WriteWithCallback(const WriteOptions& write_options,
704
- WriteBatch* my_batch,
705
- WriteCallback* callback,
706
- UserWriteCallback* user_write_cb = nullptr);
707
-
708
- // Returns the sequence number that is guaranteed to be smaller than or equal
709
- // to the sequence number of any key that could be inserted into the current
710
- // memtables. It can then be assumed that any write with a larger(or equal)
711
- // sequence number will be present in this memtable or a later memtable.
712
- //
713
- // If the earliest sequence number could not be determined,
714
- // kMaxSequenceNumber will be returned.
715
- //
716
- // If include_history=true, will also search Memtables in MemTableList
717
- // History.
718
- SequenceNumber GetEarliestMemTableSequenceNumber(SuperVersion* sv,
719
- bool include_history);
720
-
721
- // For a given key, check to see if there are any records for this key
722
- // in the memtables, including memtable history. If cache_only is false,
723
- // SST files will also be checked.
724
- //
725
- // `key` should NOT have user-defined timestamp appended to user key even if
726
- // timestamp is enabled.
727
- //
728
- // If a key is found, *found_record_for_key will be set to true and
729
- // *seq will be set to the stored sequence number for the latest
730
- // operation on this key or kMaxSequenceNumber if unknown. If user-defined
731
- // timestamp is enabled for this column family and timestamp is not nullptr,
732
- // then *timestamp will be set to the stored timestamp for the latest
733
- // operation on this key.
734
- // If no key is found, *found_record_for_key will be set to false.
735
- //
736
- // Note: If cache_only=false, it is possible for *seq to be set to 0 if
737
- // the sequence number has been cleared from the record. If the caller is
738
- // holding an active db snapshot, we know the missing sequence must be less
739
- // than the snapshot's sequence number (sequence numbers are only cleared
740
- // when there are no earlier active snapshots).
741
- //
742
- // If NotFound is returned and found_record_for_key is set to false, then no
743
- // record for this key was found. If the caller is holding an active db
744
- // snapshot, we know that no key could have existing after this snapshot
745
- // (since we do not compact keys that have an earlier snapshot).
746
- //
747
- // Only records newer than or at `lower_bound_seq` are guaranteed to be
748
- // returned. Memtables and files may not be checked if it only contains data
749
- // older than `lower_bound_seq`.
750
- //
751
- // Returns OK or NotFound on success,
752
- // other status on unexpected error.
753
- // TODO(andrewkr): this API need to be aware of range deletion operations
754
- Status GetLatestSequenceForKey(SuperVersion* sv, const Slice& key,
755
- bool cache_only,
756
- SequenceNumber lower_bound_seq,
757
- SequenceNumber* seq, std::string* timestamp,
758
- bool* found_record_for_key,
759
- bool* is_blob_index);
760
-
761
- Status TraceIteratorSeek(const uint32_t& cf_id, const Slice& key,
762
- const Slice& lower_bound, const Slice upper_bound);
763
- Status TraceIteratorSeekForPrev(const uint32_t& cf_id, const Slice& key,
764
- const Slice& lower_bound,
765
- const Slice upper_bound);
766
-
767
- // Similar to GetSnapshot(), but also lets the db know that this snapshot
768
- // will be used for transaction write-conflict checking. The DB can then
769
- // make sure not to compact any keys that would prevent a write-conflict from
770
- // being detected.
771
- const Snapshot* GetSnapshotForWriteConflictBoundary();
772
-
773
- // checks if all live files exist on file system and that their file sizes
774
- // match to our in-memory records
775
- virtual Status CheckConsistency();
776
-
777
- // max_file_num_to_ignore allows bottom level compaction to filter out newly
778
- // compacted SST files. Setting max_file_num_to_ignore to kMaxUint64 will
779
- // disable the filtering
780
- // If `final_output_level` is not nullptr, it is set to manual compaction's
781
- // output level if returned status is OK, and it may or may not be set to
782
- // manual compaction's output level if returned status is not OK.
783
- Status RunManualCompaction(ColumnFamilyData* cfd, int input_level,
784
- int output_level,
785
- const CompactRangeOptions& compact_range_options,
786
- const Slice* begin, const Slice* end,
787
- bool exclusive, bool disallow_trivial_move,
788
- uint64_t max_file_num_to_ignore,
789
- const std::string& trim_ts,
790
- int* final_output_level = nullptr);
791
-
792
- // Return an internal iterator over the current state of the database.
793
- // The keys of this iterator are internal keys (see format.h).
794
- // The returned iterator should be deleted when no longer needed.
795
- // If allow_unprepared_value is true, the returned iterator may defer reading
796
- // the value and so will require PrepareValue() to be called before value();
797
- // allow_unprepared_value = false is convenient when this optimization is not
798
- // useful, e.g. when reading the whole column family.
799
- //
800
- // read_options.ignore_range_deletions determines whether range tombstones are
801
- // processed in the returned interator internally, i.e., whether range
802
- // tombstone covered keys are in this iterator's output.
803
- // @param read_options Must outlive the returned iterator.
804
- InternalIterator* NewInternalIterator(
805
- const ReadOptions& read_options, Arena* arena, SequenceNumber sequence,
806
- ColumnFamilyHandle* column_family = nullptr,
807
- bool allow_unprepared_value = false);
808
-
809
- // Note: to support DB iterator refresh, memtable range tombstones in the
810
- // underlying merging iterator needs to be refreshed. If db_iter is not
811
- // nullptr, db_iter->SetMemtableRangetombstoneIter() is called with the
812
- // memtable range tombstone iterator used by the underlying merging iterator.
813
- // This range tombstone iterator can be refreshed later by db_iter.
814
- // @param read_options Must outlive the returned iterator.
815
- InternalIterator* NewInternalIterator(const ReadOptions& read_options,
816
- ColumnFamilyData* cfd,
817
- SuperVersion* super_version,
818
- Arena* arena, SequenceNumber sequence,
819
- bool allow_unprepared_value,
820
- ArenaWrappedDBIter* db_iter = nullptr);
821
-
822
- LogsWithPrepTracker* logs_with_prep_tracker() {
823
- return &logs_with_prep_tracker_;
824
- }
825
-
826
- struct BGJobLimits {
827
- int max_flushes;
828
- int max_compactions;
829
- };
830
- // Returns maximum background flushes and compactions allowed to be scheduled
831
- BGJobLimits GetBGJobLimits() const;
832
- // Need a static version that can be called during SanitizeOptions().
833
- static BGJobLimits GetBGJobLimits(int max_background_flushes,
834
- int max_background_compactions,
835
- int max_background_jobs,
836
- bool parallelize_compactions);
837
-
838
- // move logs pending closing from job_context to the DB queue and
839
- // schedule a purge
840
- void ScheduleBgLogWriterClose(JobContext* job_context);
841
-
842
- uint64_t MinLogNumberToKeep();
843
-
844
- uint64_t MinLogNumberToRecycle();
845
-
846
- // Returns the lower bound file number for SSTs that won't be deleted, even if
847
- // they're obsolete. This lower bound is used internally to prevent newly
848
- // created flush/compaction output files from being deleted before they're
849
- // installed. This technique avoids the need for tracking the exact numbers of
850
- // files pending creation, although it prevents more files than necessary from
851
- // being deleted.
852
- uint64_t MinObsoleteSstNumberToKeep();
853
-
854
- uint64_t GetObsoleteSstFilesSize();
855
-
856
- // Returns the list of live files in 'live' and the list
857
- // of all files in the filesystem in 'candidate_files'.
858
- // If force == false and the last call was less than
859
- // db_options_.delete_obsolete_files_period_micros microseconds ago,
860
- // it will not fill up the job_context
861
- void FindObsoleteFiles(JobContext* job_context, bool force,
862
- bool no_full_scan = false);
863
-
864
- // Diffs the files listed in filenames and those that do not
865
- // belong to live files are possibly removed. Also, removes all the
866
- // files in sst_delete_files and log_delete_files.
867
- // It is not necessary to hold the mutex when invoking this method.
868
- // If FindObsoleteFiles() was run, we need to also run
869
- // PurgeObsoleteFiles(), even if disable_delete_obsolete_files_ is true
870
- void PurgeObsoleteFiles(JobContext& background_contet,
871
- bool schedule_only = false);
872
-
873
- // Schedule a background job to actually delete obsolete files.
874
- void SchedulePurge();
875
-
876
- const SnapshotList& snapshots() const { return snapshots_; }
877
-
878
- // load list of snapshots to `snap_vector` that is no newer than `max_seq`
879
- // in ascending order.
880
- // `oldest_write_conflict_snapshot` is filled with the oldest snapshot
881
- // which satisfies SnapshotImpl.is_write_conflict_boundary_ = true.
882
- void LoadSnapshots(std::vector<SequenceNumber>* snap_vector,
883
- SequenceNumber* oldest_write_conflict_snapshot,
884
- const SequenceNumber& max_seq) const {
885
- InstrumentedMutexLock l(mutex());
886
- snapshots().GetAll(snap_vector, oldest_write_conflict_snapshot, max_seq);
887
- }
888
-
889
- const ImmutableDBOptions& immutable_db_options() const {
890
- return immutable_db_options_;
891
- }
892
-
893
- // Cancel all background jobs, including flush, compaction, background
894
- // purging, stats dumping threads, etc. If `wait` = true, wait for the
895
- // running jobs to abort or finish before returning. Otherwise, only
896
- // sends the signals.
897
- void CancelAllBackgroundWork(bool wait);
898
-
899
- // Find Super version and reference it. Based on options, it might return
900
- // the thread local cached one.
901
- // Call ReturnAndCleanupSuperVersion() when it is no longer needed.
902
- SuperVersion* GetAndRefSuperVersion(ColumnFamilyData* cfd);
903
-
904
- // Similar to the previous function but looks up based on a column family id.
905
- // nullptr will be returned if this column family no longer exists.
906
- // REQUIRED: this function should only be called on the write thread or if the
907
- // mutex is held.
908
- SuperVersion* GetAndRefSuperVersion(uint32_t column_family_id);
909
-
910
- // Un-reference the super version and clean it up if it is the last reference.
911
- void CleanupSuperVersion(SuperVersion* sv);
912
-
913
- // Un-reference the super version and return it to thread local cache if
914
- // needed. If it is the last reference of the super version. Clean it up
915
- // after un-referencing it.
916
- void ReturnAndCleanupSuperVersion(ColumnFamilyData* cfd, SuperVersion* sv);
917
-
918
- // Similar to the previous function but looks up based on a column family id.
919
- // nullptr will be returned if this column family no longer exists.
920
- // REQUIRED: this function should only be called on the write thread.
921
- void ReturnAndCleanupSuperVersion(uint32_t colun_family_id, SuperVersion* sv);
922
-
923
- // REQUIRED: this function should only be called on the write thread or if the
924
- // mutex is held. Return value only valid until next call to this function or
925
- // mutex is released.
926
- ColumnFamilyHandle* GetColumnFamilyHandle(uint32_t column_family_id);
927
-
928
- // Same as above, should called without mutex held and not on write thread.
929
- std::unique_ptr<ColumnFamilyHandle> GetColumnFamilyHandleUnlocked(
930
- uint32_t column_family_id);
931
-
932
- // Returns the number of currently running flushes.
933
- // REQUIREMENT: mutex_ must be held when calling this function.
934
- int num_running_flushes() {
935
- mutex_.AssertHeld();
936
- return num_running_flushes_;
937
- }
938
-
939
- // Returns the number of currently running compactions.
940
- // REQUIREMENT: mutex_ must be held when calling this function.
941
- int num_running_compactions() {
942
- mutex_.AssertHeld();
943
- return num_running_compactions_;
944
- }
945
-
946
- const WriteController& write_controller() { return write_controller_; }
947
-
948
- // hollow transactions shell used for recovery.
949
- // these will then be passed to TransactionDB so that
950
- // locks can be reacquired before writing can resume.
951
- struct RecoveredTransaction {
952
- std::string name_;
953
- bool unprepared_;
954
-
955
- struct BatchInfo {
956
- uint64_t log_number_;
957
- // TODO(lth): For unprepared, the memory usage here can be big for
958
- // unprepared transactions. This is only useful for rollbacks, and we
959
- // can in theory just keep keyset for that.
960
- WriteBatch* batch_;
961
- // Number of sub-batches. A new sub-batch is created if txn attempts to
962
- // insert a duplicate key,seq to memtable. This is currently used in
963
- // WritePreparedTxn/WriteUnpreparedTxn.
964
- size_t batch_cnt_;
965
- };
966
-
967
- // This maps the seq of the first key in the batch to BatchInfo, which
968
- // contains WriteBatch and other information relevant to the batch.
969
- //
970
- // For WriteUnprepared, batches_ can have size greater than 1, but for
971
- // other write policies, it must be of size 1.
972
- std::map<SequenceNumber, BatchInfo> batches_;
973
-
974
- explicit RecoveredTransaction(const uint64_t log, const std::string& name,
975
- WriteBatch* batch, SequenceNumber seq,
976
- size_t batch_cnt, bool unprepared)
977
- : name_(name), unprepared_(unprepared) {
978
- batches_[seq] = {log, batch, batch_cnt};
979
- }
980
-
981
- ~RecoveredTransaction() {
982
- for (auto& it : batches_) {
983
- delete it.second.batch_;
984
- }
985
- }
986
-
987
- void AddBatch(SequenceNumber seq, uint64_t log_number, WriteBatch* batch,
988
- size_t batch_cnt, bool unprepared) {
989
- assert(batches_.count(seq) == 0);
990
- batches_[seq] = {log_number, batch, batch_cnt};
991
- // Prior state must be unprepared, since the prepare batch must be the
992
- // last batch.
993
- assert(unprepared_);
994
- unprepared_ = unprepared;
995
- }
996
- };
997
-
998
- bool allow_2pc() const { return immutable_db_options_.allow_2pc; }
999
-
1000
- std::unordered_map<std::string, RecoveredTransaction*>
1001
- recovered_transactions() {
1002
- return recovered_transactions_;
1003
- }
1004
-
1005
- RecoveredTransaction* GetRecoveredTransaction(const std::string& name) {
1006
- auto it = recovered_transactions_.find(name);
1007
- if (it == recovered_transactions_.end()) {
1008
- return nullptr;
1009
- } else {
1010
- return it->second;
1011
- }
1012
- }
1013
-
1014
- void InsertRecoveredTransaction(const uint64_t log, const std::string& name,
1015
- WriteBatch* batch, SequenceNumber seq,
1016
- size_t batch_cnt, bool unprepared_batch) {
1017
- // For WriteUnpreparedTxn, InsertRecoveredTransaction is called multiple
1018
- // times for every unprepared batch encountered during recovery.
1019
- //
1020
- // If the transaction is prepared, then the last call to
1021
- // InsertRecoveredTransaction will have unprepared_batch = false.
1022
- auto rtxn = recovered_transactions_.find(name);
1023
- if (rtxn == recovered_transactions_.end()) {
1024
- recovered_transactions_[name] = new RecoveredTransaction(
1025
- log, name, batch, seq, batch_cnt, unprepared_batch);
1026
- } else {
1027
- rtxn->second->AddBatch(seq, log, batch, batch_cnt, unprepared_batch);
1028
- }
1029
- logs_with_prep_tracker_.MarkLogAsContainingPrepSection(log);
1030
- }
1031
-
1032
- void DeleteRecoveredTransaction(const std::string& name) {
1033
- auto it = recovered_transactions_.find(name);
1034
- assert(it != recovered_transactions_.end());
1035
- auto* trx = it->second;
1036
- recovered_transactions_.erase(it);
1037
- for (const auto& info : trx->batches_) {
1038
- logs_with_prep_tracker_.MarkLogAsHavingPrepSectionFlushed(
1039
- info.second.log_number_);
1040
- }
1041
- delete trx;
1042
- }
1043
-
1044
- void DeleteAllRecoveredTransactions() {
1045
- for (auto it = recovered_transactions_.begin();
1046
- it != recovered_transactions_.end(); ++it) {
1047
- delete it->second;
1048
- }
1049
- recovered_transactions_.clear();
1050
- }
1051
-
1052
- void AddToLogsToFreeQueue(log::Writer* log_writer) {
1053
- mutex_.AssertHeld();
1054
- logs_to_free_queue_.push_back(log_writer);
1055
- }
1056
-
1057
- void AddSuperVersionsToFreeQueue(SuperVersion* sv) {
1058
- superversions_to_free_queue_.push_back(sv);
1059
- }
1060
-
1061
- void SetSnapshotChecker(SnapshotChecker* snapshot_checker);
1062
-
1063
- // Fill JobContext with snapshot information needed by flush and compaction.
1064
- void GetSnapshotContext(JobContext* job_context,
1065
- std::vector<SequenceNumber>* snapshot_seqs,
1066
- SequenceNumber* earliest_write_conflict_snapshot,
1067
- SnapshotChecker** snapshot_checker);
1068
-
1069
- // Not thread-safe.
1070
- void SetRecoverableStatePreReleaseCallback(PreReleaseCallback* callback);
1071
-
1072
- InstrumentedMutex* mutex() const { return &mutex_; }
1073
-
1074
- // Initialize a brand new DB. The DB directory is expected to be empty before
1075
- // calling it. Push new manifest file name into `new_filenames`.
1076
- Status NewDB(std::vector<std::string>* new_filenames);
1077
-
1078
- // This is to be used only by internal rocksdb classes.
1079
- static Status Open(const DBOptions& db_options, const std::string& name,
1080
- const std::vector<ColumnFamilyDescriptor>& column_families,
1081
- std::vector<ColumnFamilyHandle*>* handles, DB** dbptr,
1082
- const bool seq_per_batch, const bool batch_per_txn,
1083
- const bool is_retry, bool* can_retry);
1084
-
1085
- static IOStatus CreateAndNewDirectory(
1086
- FileSystem* fs, const std::string& dirname,
1087
- std::unique_ptr<FSDirectory>* directory);
1088
-
1089
- // find stats map from stats_history_ with smallest timestamp in
1090
- // the range of [start_time, end_time)
1091
- bool FindStatsByTime(uint64_t start_time, uint64_t end_time,
1092
- uint64_t* new_time,
1093
- std::map<std::string, uint64_t>* stats_map);
1094
-
1095
- // Print information of all tombstones of all iterators to the std::string
1096
- // This is only used by ldb. The output might be capped. Tombstones
1097
- // printed out are not guaranteed to be in any order.
1098
- Status TablesRangeTombstoneSummary(ColumnFamilyHandle* column_family,
1099
- int max_entries_to_print,
1100
- std::string* out_str);
1101
-
1102
- VersionSet* GetVersionSet() const { return versions_.get(); }
1103
-
1104
- Status WaitForCompact(
1105
- const WaitForCompactOptions& wait_for_compact_options) override;
1106
-
1107
- #ifndef NDEBUG
1108
- // Compact any files in the named level that overlap [*begin, *end]
1109
- Status TEST_CompactRange(int level, const Slice* begin, const Slice* end,
1110
- ColumnFamilyHandle* column_family = nullptr,
1111
- bool disallow_trivial_move = false);
1112
-
1113
- Status TEST_SwitchWAL();
1114
-
1115
- bool TEST_UnableToReleaseOldestLog() { return unable_to_release_oldest_log_; }
1116
-
1117
- bool TEST_IsLogGettingFlushed() {
1118
- return alive_log_files_.begin()->getting_flushed;
1119
- }
1120
-
1121
- Status TEST_SwitchMemtable(ColumnFamilyData* cfd = nullptr);
1122
-
1123
- // Force current memtable contents to be flushed.
1124
- Status TEST_FlushMemTable(bool wait = true, bool allow_write_stall = false,
1125
- ColumnFamilyHandle* cfh = nullptr);
1126
-
1127
- Status TEST_FlushMemTable(ColumnFamilyData* cfd,
1128
- const FlushOptions& flush_opts);
1129
-
1130
- // Flush (multiple) ColumnFamilyData without using ColumnFamilyHandle. This
1131
- // is because in certain cases, we can flush column families, wait for the
1132
- // flush to complete, but delete the column family handle before the wait
1133
- // finishes. For example in CompactRange.
1134
- Status TEST_AtomicFlushMemTables(
1135
- const autovector<ColumnFamilyData*>& provided_candidate_cfds,
1136
- const FlushOptions& flush_opts);
1137
-
1138
- // Wait for background threads to complete scheduled work.
1139
- Status TEST_WaitForBackgroundWork();
1140
-
1141
- // Wait for memtable compaction
1142
- Status TEST_WaitForFlushMemTable(ColumnFamilyHandle* column_family = nullptr);
1143
-
1144
- Status TEST_WaitForCompact();
1145
- Status TEST_WaitForCompact(
1146
- const WaitForCompactOptions& wait_for_compact_options);
1147
-
1148
- // Wait for any background purge
1149
- Status TEST_WaitForPurge();
1150
-
1151
- // Get the background error status
1152
- Status TEST_GetBGError();
1153
-
1154
- // Return the maximum overlapping data (in bytes) at next level for any
1155
- // file at a level >= 1.
1156
- uint64_t TEST_MaxNextLevelOverlappingBytes(
1157
- ColumnFamilyHandle* column_family = nullptr);
1158
-
1159
- // Return the current manifest file no.
1160
- uint64_t TEST_Current_Manifest_FileNo();
1161
-
1162
- // Returns the number that'll be assigned to the next file that's created.
1163
- uint64_t TEST_Current_Next_FileNo();
1164
-
1165
- // get total level0 file size. Only for testing.
1166
- uint64_t TEST_GetLevel0TotalSize();
1167
-
1168
- void TEST_GetFilesMetaData(
1169
- ColumnFamilyHandle* column_family,
1170
- std::vector<std::vector<FileMetaData>>* metadata,
1171
- std::vector<std::shared_ptr<BlobFileMetaData>>* blob_metadata = nullptr);
1172
-
1173
- void TEST_LockMutex();
1174
-
1175
- void TEST_UnlockMutex();
1176
-
1177
- InstrumentedMutex* TEST_Mutex() { return &mutex_; }
1178
-
1179
- void TEST_SignalAllBgCv();
1180
-
1181
- // REQUIRES: mutex locked
1182
- void* TEST_BeginWrite();
1183
-
1184
- // REQUIRES: mutex locked
1185
- // pass the pointer that you got from TEST_BeginWrite()
1186
- void TEST_EndWrite(void* w);
1187
-
1188
- uint64_t TEST_MaxTotalInMemoryState() const {
1189
- return max_total_in_memory_state_;
1190
- }
1191
-
1192
- size_t TEST_LogsToFreeSize();
1193
-
1194
- uint64_t TEST_LogfileNumber();
1195
-
1196
- uint64_t TEST_total_log_size() const { return total_log_size_; }
1197
-
1198
- // Returns column family name to ImmutableCFOptions map.
1199
- Status TEST_GetAllImmutableCFOptions(
1200
- std::unordered_map<std::string, const ImmutableCFOptions*>* iopts_map);
1201
-
1202
- // Return the lastest MutableCFOptions of a column family
1203
- Status TEST_GetLatestMutableCFOptions(ColumnFamilyHandle* column_family,
1204
- MutableCFOptions* mutable_cf_options);
1205
-
1206
- Cache* TEST_table_cache() { return table_cache_.get(); }
1207
-
1208
- WriteController& TEST_write_controler() { return write_controller_; }
1209
-
1210
- uint64_t TEST_FindMinLogContainingOutstandingPrep();
1211
- uint64_t TEST_FindMinPrepLogReferencedByMemTable();
1212
- size_t TEST_PreparedSectionCompletedSize();
1213
- size_t TEST_LogsWithPrepSize();
1214
-
1215
- int TEST_BGCompactionsAllowed() const;
1216
- int TEST_BGFlushesAllowed() const;
1217
- size_t TEST_GetWalPreallocateBlockSize(uint64_t write_buffer_size) const;
1218
- void TEST_WaitForPeriodicTaskRun(std::function<void()> callback) const;
1219
- SeqnoToTimeMapping TEST_GetSeqnoToTimeMapping() const;
1220
- const autovector<uint64_t>& TEST_GetFilesToQuarantine() const;
1221
- size_t TEST_EstimateInMemoryStatsHistorySize() const;
1222
-
1223
- uint64_t TEST_GetCurrentLogNumber() const {
1224
- InstrumentedMutexLock l(mutex());
1225
- assert(!logs_.empty());
1226
- return logs_.back().number;
1227
- }
1228
-
1229
- void TEST_DeleteObsoleteFiles();
1230
-
1231
- const std::unordered_set<uint64_t>& TEST_GetFilesGrabbedForPurge() const {
1232
- return files_grabbed_for_purge_;
1233
- }
1234
-
1235
- const PeriodicTaskScheduler& TEST_GetPeriodicTaskScheduler() const;
1236
-
1237
- static Status TEST_ValidateOptions(const DBOptions& db_options) {
1238
- return ValidateOptions(db_options);
1239
- }
1240
-
1241
- #endif // NDEBUG
1242
-
1243
- // persist stats to column family "_persistent_stats"
1244
- void PersistStats();
1245
-
1246
- // dump rocksdb.stats to LOG
1247
- void DumpStats();
1248
-
1249
- // flush LOG out of application buffer
1250
- void FlushInfoLog();
1251
-
1252
- // record current sequence number to time mapping. If
1253
- // populate_historical_seconds > 0 then pre-populate all the
1254
- // sequence numbers from [1, last] to map to [now minus
1255
- // populate_historical_seconds, now].
1256
- void RecordSeqnoToTimeMapping(uint64_t populate_historical_seconds);
1257
-
1258
- // Everytime DB's seqno to time mapping changed (which already hold the db
1259
- // mutex), we install a new SuperVersion in each column family with a shared
1260
- // copy of the new mapping while holding the db mutex.
1261
- // This is done for all column families even though the column family does not
1262
- // explicitly enabled the
1263
- // `preclude_last_level_data_seconds` or `preserve_internal_time_seconds`
1264
- // features.
1265
- // This mapping supports iterators to fulfill the
1266
- // "rocksdb.iterator.write-time" iterator property for entries in memtables.
1267
- //
1268
- // Since this new SuperVersion doesn't involve an LSM tree shape change, we
1269
- // don't schedule work after installing this SuperVersion. It returns the used
1270
- // `SuperVersionContext` for clean up after release mutex.
1271
- void InstallSeqnoToTimeMappingInSV(
1272
- std::vector<SuperVersionContext>* sv_contexts);
1273
-
1274
- // Interface to block and signal the DB in case of stalling writes by
1275
- // WriteBufferManager. Each DBImpl object contains ptr to WBMStallInterface.
1276
- // When DB needs to be blocked or signalled by WriteBufferManager,
1277
- // state_ is changed accordingly.
1278
- class WBMStallInterface : public StallInterface {
1279
- public:
1280
- enum State {
1281
- BLOCKED = 0,
1282
- RUNNING,
1283
- };
1284
-
1285
- WBMStallInterface() : state_cv_(&state_mutex_) {
1286
- MutexLock lock(&state_mutex_);
1287
- state_ = State::RUNNING;
1288
- }
1289
-
1290
- void SetState(State state) {
1291
- MutexLock lock(&state_mutex_);
1292
- state_ = state;
1293
- }
1294
-
1295
- // Change the state_ to State::BLOCKED and wait until its state is
1296
- // changed by WriteBufferManager. When stall is cleared, Signal() is
1297
- // called to change the state and unblock the DB.
1298
- void Block() override {
1299
- MutexLock lock(&state_mutex_);
1300
- while (state_ == State::BLOCKED) {
1301
- TEST_SYNC_POINT("WBMStallInterface::BlockDB");
1302
- state_cv_.Wait();
1303
- }
1304
- }
1305
-
1306
- // Called from WriteBufferManager. This function changes the state_
1307
- // to State::RUNNING indicating the stall is cleared and DB can proceed.
1308
- void Signal() override {
1309
- {
1310
- MutexLock lock(&state_mutex_);
1311
- state_ = State::RUNNING;
1312
- }
1313
- state_cv_.Signal();
1314
- }
1315
-
1316
- private:
1317
- // Conditional variable and mutex to block and
1318
- // signal the DB during stalling process.
1319
- port::Mutex state_mutex_;
1320
- port::CondVar state_cv_;
1321
- // state represting whether DB is running or blocked because of stall by
1322
- // WriteBufferManager.
1323
- State state_;
1324
- };
1325
-
1326
- static void TEST_ResetDbSessionIdGen();
1327
- static std::string GenerateDbSessionId(Env* env);
1328
-
1329
- bool seq_per_batch() const { return seq_per_batch_; }
1330
-
1331
- protected:
1332
- const std::string dbname_;
1333
- // TODO(peterd): unify with VersionSet::db_id_
1334
- std::string db_id_;
1335
- // db_session_id_ is an identifier that gets reset
1336
- // every time the DB is opened
1337
- std::string db_session_id_;
1338
- std::unique_ptr<VersionSet> versions_;
1339
- // Flag to check whether we allocated and own the info log file
1340
- bool own_info_log_;
1341
- Status init_logger_creation_s_;
1342
- const DBOptions initial_db_options_;
1343
- Env* const env_;
1344
- std::shared_ptr<IOTracer> io_tracer_;
1345
- const ImmutableDBOptions immutable_db_options_;
1346
- FileSystemPtr fs_;
1347
- MutableDBOptions mutable_db_options_;
1348
- Statistics* stats_;
1349
- std::unordered_map<std::string, RecoveredTransaction*>
1350
- recovered_transactions_;
1351
- std::unique_ptr<Tracer> tracer_;
1352
- InstrumentedMutex trace_mutex_;
1353
- BlockCacheTracer block_cache_tracer_;
1354
-
1355
- // constant false canceled flag, used when the compaction is not manual
1356
- const std::atomic<bool> kManualCompactionCanceledFalse_{false};
1357
-
1358
- // State below is protected by mutex_
1359
- // With two_write_queues enabled, some of the variables that accessed during
1360
- // WriteToWAL need different synchronization: log_empty_, alive_log_files_,
1361
- // logs_, logfile_number_. Refer to the definition of each variable below for
1362
- // more description.
1363
- //
1364
- // `mutex_` can be a hot lock in some workloads, so it deserves dedicated
1365
- // cachelines.
1366
- mutable CacheAlignedInstrumentedMutex mutex_;
1367
-
1368
- ColumnFamilyHandleImpl* default_cf_handle_;
1369
- InternalStats* default_cf_internal_stats_;
1370
-
1371
- // table_cache_ provides its own synchronization
1372
- std::shared_ptr<Cache> table_cache_;
1373
-
1374
- ErrorHandler error_handler_;
1375
-
1376
- // Unified interface for logging events
1377
- EventLogger event_logger_;
1378
-
1379
- // only used for dynamically adjusting max_total_wal_size. it is a sum of
1380
- // [write_buffer_size * max_write_buffer_number] over all column families
1381
- std::atomic<uint64_t> max_total_in_memory_state_;
1382
-
1383
- // The options to access storage files
1384
- const FileOptions file_options_;
1385
-
1386
- // Additonal options for compaction and flush
1387
- FileOptions file_options_for_compaction_;
1388
-
1389
- std::unique_ptr<ColumnFamilyMemTablesImpl> column_family_memtables_;
1390
-
1391
- // Increase the sequence number after writing each batch, whether memtable is
1392
- // disabled for that or not. Otherwise the sequence number is increased after
1393
- // writing each key into memtable. This implies that when disable_memtable is
1394
- // set, the seq is not increased at all.
1395
- //
1396
- // Default: false
1397
- const bool seq_per_batch_;
1398
- // This determines during recovery whether we expect one writebatch per
1399
- // recovered transaction, or potentially multiple writebatches per
1400
- // transaction. For WriteUnprepared, this is set to false, since multiple
1401
- // batches can exist per transaction.
1402
- //
1403
- // Default: true
1404
- const bool batch_per_txn_;
1405
-
1406
- // Each flush or compaction gets its own job id. this counter makes sure
1407
- // they're unique
1408
- std::atomic<int> next_job_id_;
1409
-
1410
- std::atomic<bool> shutting_down_;
1411
-
1412
- // No new background jobs can be queued if true. This is used to prevent new
1413
- // background jobs from being queued after WaitForCompact() completes waiting
1414
- // all background jobs then attempts to close when close_db_ option is true.
1415
- bool reject_new_background_jobs_;
1416
-
1417
- // RecoveryContext struct stores the context about version edits along
1418
- // with corresponding column_family_data and column_family_options.
1419
- class RecoveryContext {
1420
- public:
1421
- ~RecoveryContext() {
1422
- for (auto& edit_list : edit_lists_) {
1423
- for (auto* edit : edit_list) {
1424
- delete edit;
1425
- }
1426
- }
1427
- }
1428
-
1429
- void UpdateVersionEdits(ColumnFamilyData* cfd, const VersionEdit& edit) {
1430
- assert(cfd != nullptr);
1431
- if (map_.find(cfd->GetID()) == map_.end()) {
1432
- uint32_t size = static_cast<uint32_t>(map_.size());
1433
- map_.emplace(cfd->GetID(), size);
1434
- cfds_.emplace_back(cfd);
1435
- mutable_cf_opts_.emplace_back(cfd->GetLatestMutableCFOptions());
1436
- edit_lists_.emplace_back(autovector<VersionEdit*>());
1437
- }
1438
- uint32_t i = map_[cfd->GetID()];
1439
- edit_lists_[i].emplace_back(new VersionEdit(edit));
1440
- }
1441
-
1442
- std::unordered_map<uint32_t, uint32_t> map_; // cf_id to index;
1443
- autovector<ColumnFamilyData*> cfds_;
1444
- autovector<const MutableCFOptions*> mutable_cf_opts_;
1445
- autovector<autovector<VersionEdit*>> edit_lists_;
1446
- // All existing data files (SST files and Blob files) found during DB::Open.
1447
- std::vector<std::string> existing_data_files_;
1448
- bool is_new_db_ = false;
1449
- };
1450
-
1451
- // Persist options to options file. Must be holding options_mutex_.
1452
- // Will lock DB mutex if !db_mutex_already_held.
1453
- Status WriteOptionsFile(const WriteOptions& write_options,
1454
- bool db_mutex_already_held);
1455
-
1456
- Status CompactRangeInternal(const CompactRangeOptions& options,
1457
- ColumnFamilyHandle* column_family,
1458
- const Slice* begin, const Slice* end,
1459
- const std::string& trim_ts);
1460
-
1461
- // The following two functions can only be called when:
1462
- // 1. WriteThread::Writer::EnterUnbatched() is used.
1463
- // 2. db_mutex is NOT held
1464
- Status RenameTempFileToOptionsFile(const std::string& file_name);
1465
- Status DeleteObsoleteOptionsFiles();
1466
-
1467
- void NotifyOnManualFlushScheduled(autovector<ColumnFamilyData*> cfds,
1468
- FlushReason flush_reason);
1469
-
1470
- void NotifyOnFlushBegin(ColumnFamilyData* cfd, FileMetaData* file_meta,
1471
- const MutableCFOptions& mutable_cf_options,
1472
- int job_id, FlushReason flush_reason);
1473
-
1474
- void NotifyOnFlushCompleted(
1475
- ColumnFamilyData* cfd, const MutableCFOptions& mutable_cf_options,
1476
- std::list<std::unique_ptr<FlushJobInfo>>* flush_jobs_info);
1477
-
1478
- void NotifyOnCompactionBegin(ColumnFamilyData* cfd, Compaction* c,
1479
- const Status& st,
1480
- const CompactionJobStats& job_stats, int job_id);
1481
-
1482
- void NotifyOnCompactionCompleted(ColumnFamilyData* cfd, Compaction* c,
1483
- const Status& st,
1484
- const CompactionJobStats& job_stats,
1485
- int job_id);
1486
- void NotifyOnMemTableSealed(ColumnFamilyData* cfd,
1487
- const MemTableInfo& mem_table_info);
1488
-
1489
- void NotifyOnExternalFileIngested(
1490
- ColumnFamilyData* cfd, const ExternalSstFileIngestionJob& ingestion_job);
1491
-
1492
- Status FlushAllColumnFamilies(const FlushOptions& flush_options,
1493
- FlushReason flush_reason);
1494
-
1495
- virtual Status FlushForGetLiveFiles();
1496
-
1497
- void NewThreadStatusCfInfo(ColumnFamilyData* cfd) const;
1498
-
1499
- void EraseThreadStatusCfInfo(ColumnFamilyData* cfd) const;
1500
-
1501
- void EraseThreadStatusDbInfo() const;
1502
-
1503
- // If disable_memtable is set the application logic must guarantee that the
1504
- // batch will still be skipped from memtable during the recovery. An excption
1505
- // to this is seq_per_batch_ mode, in which since each batch already takes one
1506
- // seq, it is ok for the batch to write to memtable during recovery as long as
1507
- // it only takes one sequence number: i.e., no duplicate keys.
1508
- // In WriteCommitted it is guarnateed since disable_memtable is used for
1509
- // prepare batch which will be written to memtable later during the commit,
1510
- // and in WritePrepared it is guaranteed since it will be used only for WAL
1511
- // markers which will never be written to memtable. If the commit marker is
1512
- // accompanied with CommitTimeWriteBatch that is not written to memtable as
1513
- // long as it has no duplicate keys, it does not violate the one-seq-per-batch
1514
- // policy.
1515
- // batch_cnt is expected to be non-zero in seq_per_batch mode and
1516
- // indicates the number of sub-patches. A sub-patch is a subset of the write
1517
- // batch that does not have duplicate keys.
1518
- Status WriteImpl(const WriteOptions& options, WriteBatch* updates,
1519
- WriteCallback* callback = nullptr,
1520
- UserWriteCallback* user_write_cb = nullptr,
1521
- uint64_t* log_used = nullptr, uint64_t log_ref = 0,
1522
- bool disable_memtable = false, uint64_t* seq_used = nullptr,
1523
- size_t batch_cnt = 0,
1524
- PreReleaseCallback* pre_release_callback = nullptr,
1525
- PostMemTableCallback* post_memtable_callback = nullptr);
1526
-
1527
- Status PipelinedWriteImpl(const WriteOptions& options, WriteBatch* updates,
1528
- WriteCallback* callback = nullptr,
1529
- UserWriteCallback* user_write_cb = nullptr,
1530
- uint64_t* log_used = nullptr, uint64_t log_ref = 0,
1531
- bool disable_memtable = false,
1532
- uint64_t* seq_used = nullptr);
1533
-
1534
- // Write only to memtables without joining any write queue
1535
- Status UnorderedWriteMemtable(const WriteOptions& write_options,
1536
- WriteBatch* my_batch, WriteCallback* callback,
1537
- uint64_t log_ref, SequenceNumber seq,
1538
- const size_t sub_batch_cnt);
1539
-
1540
- // Whether the batch requires to be assigned with an order
1541
- enum AssignOrder : bool { kDontAssignOrder, kDoAssignOrder };
1542
- // Whether it requires publishing last sequence or not
1543
- enum PublishLastSeq : bool { kDontPublishLastSeq, kDoPublishLastSeq };
1544
-
1545
- // Join the write_thread to write the batch only to the WAL. It is the
1546
- // responsibility of the caller to also write the write batch to the memtable
1547
- // if it required.
1548
- //
1549
- // sub_batch_cnt is expected to be non-zero when assign_order = kDoAssignOrder
1550
- // indicating the number of sub-batches in my_batch. A sub-patch is a subset
1551
- // of the write batch that does not have duplicate keys. When seq_per_batch is
1552
- // not set, each key is a separate sub_batch. Otherwise each duplicate key
1553
- // marks start of a new sub-batch.
1554
- Status WriteImplWALOnly(
1555
- WriteThread* write_thread, const WriteOptions& options,
1556
- WriteBatch* updates, WriteCallback* callback,
1557
- UserWriteCallback* user_write_cb, uint64_t* log_used,
1558
- const uint64_t log_ref, uint64_t* seq_used, const size_t sub_batch_cnt,
1559
- PreReleaseCallback* pre_release_callback, const AssignOrder assign_order,
1560
- const PublishLastSeq publish_last_seq, const bool disable_memtable);
1561
-
1562
- // write cached_recoverable_state_ to memtable if it is not empty
1563
- // The writer must be the leader in write_thread_ and holding mutex_
1564
- Status WriteRecoverableState();
1565
-
1566
- // Actual implementation of Close()
1567
- virtual Status CloseImpl();
1568
-
1569
- // Recover the descriptor from persistent storage. May do a significant
1570
- // amount of work to recover recently logged updates. Any changes to
1571
- // be made to the descriptor are added to *edit.
1572
- // recovered_seq is set to less than kMaxSequenceNumber if the log's tail is
1573
- // skipped.
1574
- // recovery_ctx stores the context about version edits and all those
1575
- // edits are persisted to new Manifest after successfully syncing the new WAL.
1576
- virtual Status Recover(
1577
- const std::vector<ColumnFamilyDescriptor>& column_families,
1578
- bool read_only = false, bool error_if_wal_file_exists = false,
1579
- bool error_if_data_exists_in_wals = false, bool is_retry = false,
1580
- uint64_t* recovered_seq = nullptr,
1581
- RecoveryContext* recovery_ctx = nullptr, bool* can_retry = nullptr);
1582
-
1583
- virtual bool OwnTablesAndLogs() const { return true; }
1584
-
1585
- // Setup DB identity file, and write DB ID to manifest if necessary.
1586
- Status SetupDBId(const WriteOptions& write_options, bool read_only,
1587
- RecoveryContext* recovery_ctx);
1588
- // Assign db_id_ and write DB ID to manifest if necessary.
1589
- void SetDBId(std::string&& id, bool read_only, RecoveryContext* recovery_ctx);
1590
-
1591
- // Collect a deduplicated collection of paths used by this DB, including
1592
- // dbname_, DBOptions.db_paths, ColumnFamilyOptions.cf_paths.
1593
- std::set<std::string> CollectAllDBPaths();
1594
-
1595
- // REQUIRES: db mutex held when calling this function, but the db mutex can
1596
- // be released and re-acquired. Db mutex will be held when the function
1597
- // returns.
1598
- // It stores all existing data files (SST and Blob) in RecoveryContext. In
1599
- // the meantime, we find out the largest file number present in the paths, and
1600
- // bump up the version set's next_file_number_ to be 1 + largest_file_number.
1601
- // recovery_ctx stores the context about version edits. All those edits are
1602
- // persisted to new Manifest after successfully syncing the new WAL.
1603
- Status MaybeUpdateNextFileNumber(RecoveryContext* recovery_ctx);
1604
-
1605
- // Track existing data files, including both referenced and unreferenced SST
1606
- // and Blob files in SstFileManager. This is only called during DB::Open and
1607
- // it's called before any file deletion start so that their deletion can be
1608
- // properly rate limited.
1609
- // Files may not be referenced in the MANIFEST because (e.g.
1610
- // 1. It's best effort recovery;
1611
- // 2. The VersionEdits referencing the SST files are appended to
1612
- // RecoveryContext, DB crashes when syncing the MANIFEST, the VersionEdits are
1613
- // still not synced to MANIFEST during recovery.)
1614
- //
1615
- // If the file is referenced in Manifest (typically that's the
1616
- // vast majority of all files), since it already has the file size
1617
- // on record, we don't need to query the file system. Otherwise, we query the
1618
- // file system for the size of an unreferenced file.
1619
- void TrackExistingDataFiles(
1620
- const std::vector<std::string>& existing_data_files);
1621
-
1622
- // SetDbSessionId() should be called in the constuctor DBImpl()
1623
- // to ensure that db_session_id_ gets updated every time the DB is opened
1624
- void SetDbSessionId();
1625
-
1626
- Status FailIfCfHasTs(const ColumnFamilyHandle* column_family) const;
1627
- Status FailIfTsMismatchCf(ColumnFamilyHandle* column_family,
1628
- const Slice& ts) const;
1629
-
1630
- // Check that the read timestamp `ts` is at or above the `full_history_ts_low`
1631
- // timestamp in a `SuperVersion`. It's necessary to do this check after
1632
- // grabbing the SuperVersion. If the check passed, the referenced SuperVersion
1633
- // this read holds on to can ensure the read won't be affected if
1634
- // `full_history_ts_low` is increased concurrently, and this achieves that
1635
- // without explicitly locking by piggybacking the SuperVersion.
1636
- Status FailIfReadCollapsedHistory(const ColumnFamilyData* cfd,
1637
- const SuperVersion* sv,
1638
- const Slice& ts) const;
1639
-
1640
- // recovery_ctx stores the context about version edits and
1641
- // LogAndApplyForRecovery persist all those edits to new Manifest after
1642
- // successfully syncing new WAL.
1643
- // LogAndApplyForRecovery should be called only once during recovery and it
1644
- // should be called when RocksDB writes to a first new MANIFEST since this
1645
- // recovery.
1646
- Status LogAndApplyForRecovery(const RecoveryContext& recovery_ctx);
1647
-
1648
- void InvokeWalFilterIfNeededOnColumnFamilyToWalNumberMap();
1649
-
1650
- // Return true to proceed with current WAL record whose content is stored in
1651
- // `batch`. Return false to skip current WAL record.
1652
- bool InvokeWalFilterIfNeededOnWalRecord(uint64_t wal_number,
1653
- const std::string& wal_fname,
1654
- log::Reader::Reporter& reporter,
1655
- Status& status, bool& stop_replay,
1656
- WriteBatch& batch);
1657
-
1658
- private:
1659
- friend class DB;
1660
- friend class ErrorHandler;
1661
- friend class InternalStats;
1662
- friend class PessimisticTransaction;
1663
- friend class TransactionBaseImpl;
1664
- friend class WriteCommittedTxn;
1665
- friend class WritePreparedTxn;
1666
- friend class WritePreparedTxnDB;
1667
- friend class WriteBatchWithIndex;
1668
- friend class WriteUnpreparedTxnDB;
1669
- friend class WriteUnpreparedTxn;
1670
-
1671
- friend class ForwardIterator;
1672
- friend struct SuperVersion;
1673
- friend class CompactedDBImpl;
1674
- friend class DBImplFollower;
1675
- #ifndef NDEBUG
1676
- friend class DBTest_ConcurrentFlushWAL_Test;
1677
- friend class DBTest_MixedSlowdownOptionsStop_Test;
1678
- friend class DBCompactionTest_CompactBottomLevelFilesWithDeletions_Test;
1679
- friend class DBCompactionTest_CompactionDuringShutdown_Test;
1680
- friend class DBCompactionTest_DelayCompactBottomLevelFilesWithDeletions_Test;
1681
- friend class DBCompactionTest_DisableCompactBottomLevelFiles_Test;
1682
- friend class StatsHistoryTest_PersistentStatsCreateColumnFamilies_Test;
1683
- friend class DBTest2_ReadCallbackTest_Test;
1684
- friend class WriteCallbackPTest_WriteWithCallbackTest_Test;
1685
- friend class XFTransactionWriteHandler;
1686
- friend class DBBlobIndexTest;
1687
- friend class WriteUnpreparedTransactionTest_RecoveryTest_Test;
1688
- #endif
1689
-
1690
- struct CompactionState;
1691
- struct PrepickedCompaction;
1692
- struct PurgeFileInfo;
1693
-
1694
- struct WriteContext {
1695
- SuperVersionContext superversion_context;
1696
- autovector<MemTable*> memtables_to_free_;
1697
-
1698
- explicit WriteContext(bool create_superversion = false)
1699
- : superversion_context(create_superversion) {}
1700
-
1701
- ~WriteContext() {
1702
- superversion_context.Clean();
1703
- for (auto& m : memtables_to_free_) {
1704
- delete m;
1705
- }
1706
- }
1707
- };
1708
-
1709
- struct LogFileNumberSize {
1710
- explicit LogFileNumberSize(uint64_t _number) : number(_number) {}
1711
- LogFileNumberSize() {}
1712
- void AddSize(uint64_t new_size) { size += new_size; }
1713
- uint64_t number;
1714
- uint64_t size = 0;
1715
- bool getting_flushed = false;
1716
- };
1717
-
1718
- struct LogWriterNumber {
1719
- // pass ownership of _writer
1720
- LogWriterNumber(uint64_t _number, log::Writer* _writer)
1721
- : number(_number), writer(_writer) {}
1722
-
1723
- log::Writer* ReleaseWriter() {
1724
- auto* w = writer;
1725
- writer = nullptr;
1726
- return w;
1727
- }
1728
- Status ClearWriter() {
1729
- Status s;
1730
- if (writer->file()) {
1731
- // TODO: plumb Env::IOActivity, Env::IOPriority
1732
- s = writer->WriteBuffer(WriteOptions());
1733
- }
1734
- delete writer;
1735
- writer = nullptr;
1736
- return s;
1737
- }
1738
-
1739
- bool IsSyncing() { return getting_synced; }
1740
-
1741
- uint64_t GetPreSyncSize() {
1742
- assert(getting_synced);
1743
- return pre_sync_size;
1744
- }
1745
-
1746
- void PrepareForSync() {
1747
- assert(!getting_synced);
1748
- // Ensure the head of logs_ is marked as getting_synced if any is.
1749
- getting_synced = true;
1750
- // If last sync failed on a later WAL, this could be a fully synced
1751
- // and closed WAL that just needs to be recorded as synced in the
1752
- // manifest.
1753
- if (writer->file()) {
1754
- // Size is expected to be monotonically increasing.
1755
- assert(writer->file()->GetFlushedSize() >= pre_sync_size);
1756
- pre_sync_size = writer->file()->GetFlushedSize();
1757
- }
1758
- }
1759
-
1760
- void FinishSync() {
1761
- assert(getting_synced);
1762
- getting_synced = false;
1763
- }
1764
-
1765
- uint64_t number;
1766
- // Visual Studio doesn't support deque's member to be noncopyable because
1767
- // of a std::unique_ptr as a member.
1768
- log::Writer* writer; // own
1769
-
1770
- private:
1771
- // true for some prefix of logs_
1772
- bool getting_synced = false;
1773
- // The size of the file before the sync happens. This amount is guaranteed
1774
- // to be persisted even if appends happen during sync so it can be used for
1775
- // tracking the synced size in MANIFEST.
1776
- uint64_t pre_sync_size = 0;
1777
- };
1778
-
1779
- struct LogContext {
1780
- explicit LogContext(bool need_sync = false)
1781
- : need_log_sync(need_sync), need_log_dir_sync(need_sync) {}
1782
- bool need_log_sync = false;
1783
- bool need_log_dir_sync = false;
1784
- log::Writer* writer = nullptr;
1785
- LogFileNumberSize* log_file_number_size = nullptr;
1786
- };
1787
-
1788
- // PurgeFileInfo is a structure to hold information of files to be deleted in
1789
- // purge_files_
1790
- struct PurgeFileInfo {
1791
- std::string fname;
1792
- std::string dir_to_sync;
1793
- FileType type;
1794
- uint64_t number;
1795
- int job_id;
1796
- PurgeFileInfo(std::string fn, std::string d, FileType t, uint64_t num,
1797
- int jid)
1798
- : fname(fn), dir_to_sync(d), type(t), number(num), job_id(jid) {}
1799
- };
1800
-
1801
- // Argument required by background flush thread.
1802
- struct BGFlushArg {
1803
- BGFlushArg()
1804
- : cfd_(nullptr),
1805
- max_memtable_id_(0),
1806
- superversion_context_(nullptr),
1807
- flush_reason_(FlushReason::kOthers) {}
1808
- BGFlushArg(ColumnFamilyData* cfd, uint64_t max_memtable_id,
1809
- SuperVersionContext* superversion_context,
1810
- FlushReason flush_reason)
1811
- : cfd_(cfd),
1812
- max_memtable_id_(max_memtable_id),
1813
- superversion_context_(superversion_context),
1814
- flush_reason_(flush_reason) {}
1815
-
1816
- // Column family to flush.
1817
- ColumnFamilyData* cfd_;
1818
- // Maximum ID of memtable to flush. In this column family, memtables with
1819
- // IDs smaller than this value must be flushed before this flush completes.
1820
- uint64_t max_memtable_id_;
1821
- // Pointer to a SuperVersionContext object. After flush completes, RocksDB
1822
- // installs a new superversion for the column family. This operation
1823
- // requires a SuperVersionContext object (currently embedded in JobContext).
1824
- SuperVersionContext* superversion_context_;
1825
- FlushReason flush_reason_;
1826
- };
1827
-
1828
- // Argument passed to flush thread.
1829
- struct FlushThreadArg {
1830
- DBImpl* db_;
1831
-
1832
- Env::Priority thread_pri_;
1833
- };
1834
-
1835
- // Information for a manual compaction
1836
- struct ManualCompactionState {
1837
- ManualCompactionState(ColumnFamilyData* _cfd, int _input_level,
1838
- int _output_level, uint32_t _output_path_id,
1839
- bool _exclusive, bool _disallow_trivial_move,
1840
- std::atomic<bool>* _canceled)
1841
- : cfd(_cfd),
1842
- input_level(_input_level),
1843
- output_level(_output_level),
1844
- output_path_id(_output_path_id),
1845
- exclusive(_exclusive),
1846
- disallow_trivial_move(_disallow_trivial_move),
1847
- canceled(_canceled ? *_canceled : canceled_internal_storage) {}
1848
- // When _canceled is not provided by ther user, we assign the reference of
1849
- // canceled_internal_storage to it to consolidate canceled and
1850
- // manual_compaction_paused since DisableManualCompaction() might be
1851
- // called
1852
-
1853
- ColumnFamilyData* cfd;
1854
- int input_level;
1855
- int output_level;
1856
- uint32_t output_path_id;
1857
- Status status;
1858
- bool done = false;
1859
- bool in_progress = false; // compaction request being processed?
1860
- bool incomplete = false; // only part of requested range compacted
1861
- bool exclusive; // current behavior of only one manual
1862
- bool disallow_trivial_move; // Force actual compaction to run
1863
- const InternalKey* begin = nullptr; // nullptr means beginning of key range
1864
- const InternalKey* end = nullptr; // nullptr means end of key range
1865
- InternalKey* manual_end = nullptr; // how far we are compacting
1866
- InternalKey tmp_storage; // Used to keep track of compaction progress
1867
- InternalKey tmp_storage1; // Used to keep track of compaction progress
1868
-
1869
- // When the user provides a canceled pointer in CompactRangeOptions, the
1870
- // above varaibe is the reference of the user-provided
1871
- // `canceled`, otherwise, it is the reference of canceled_internal_storage
1872
- std::atomic<bool> canceled_internal_storage = false;
1873
- std::atomic<bool>& canceled; // Compaction canceled pointer reference
1874
- };
1875
- struct PrepickedCompaction {
1876
- // background compaction takes ownership of `compaction`.
1877
- Compaction* compaction;
1878
- // caller retains ownership of `manual_compaction_state` as it is reused
1879
- // across background compactions.
1880
- ManualCompactionState* manual_compaction_state; // nullptr if non-manual
1881
- // task limiter token is requested during compaction picking.
1882
- std::unique_ptr<TaskLimiterToken> task_token;
1883
- };
1884
-
1885
- struct CompactionArg {
1886
- // caller retains ownership of `db`.
1887
- DBImpl* db;
1888
- // background compaction takes ownership of `prepicked_compaction`.
1889
- PrepickedCompaction* prepicked_compaction;
1890
- Env::Priority compaction_pri_;
1891
- };
1892
-
1893
- static bool IsRecoveryFlush(FlushReason flush_reason) {
1894
- return flush_reason == FlushReason::kErrorRecoveryRetryFlush ||
1895
- flush_reason == FlushReason::kErrorRecovery;
1896
- }
1897
- // Initialize the built-in column family for persistent stats. Depending on
1898
- // whether on-disk persistent stats have been enabled before, it may either
1899
- // create a new column family and column family handle or just a column family
1900
- // handle.
1901
- // Required: DB mutex held
1902
- Status InitPersistStatsColumnFamily();
1903
-
1904
- // Persistent Stats column family has two format version key which are used
1905
- // for compatibility check. Write format version if it's created for the
1906
- // first time, read format version and check compatibility if recovering
1907
- // from disk. This function requires DB mutex held at entrance but may
1908
- // release and re-acquire DB mutex in the process.
1909
- // Required: DB mutex held
1910
- Status PersistentStatsProcessFormatVersion();
1911
-
1912
- Status ResumeImpl(DBRecoverContext context);
1913
-
1914
- void MaybeIgnoreError(Status* s) const;
1915
-
1916
- const Status CreateArchivalDirectory();
1917
-
1918
- // Create a column family, without some of the follow-up work yet
1919
- Status CreateColumnFamilyImpl(const ReadOptions& read_options,
1920
- const WriteOptions& write_options,
1921
- const ColumnFamilyOptions& cf_options,
1922
- const std::string& cf_name,
1923
- ColumnFamilyHandle** handle);
1924
-
1925
- // Follow-up work to user creating a column family or (families)
1926
- Status WrapUpCreateColumnFamilies(
1927
- const ReadOptions& read_options, const WriteOptions& write_options,
1928
- const std::vector<const ColumnFamilyOptions*>& cf_options);
1929
-
1930
- Status DropColumnFamilyImpl(ColumnFamilyHandle* column_family);
1931
-
1932
- // Delete any unneeded files and stale in-memory entries.
1933
- void DeleteObsoleteFiles();
1934
- // Delete obsolete files and log status and information of file deletion
1935
- void DeleteObsoleteFileImpl(int job_id, const std::string& fname,
1936
- const std::string& path_to_sync, FileType type,
1937
- uint64_t number);
1938
-
1939
- // Background process needs to call
1940
- // auto x = CaptureCurrentFileNumberInPendingOutputs()
1941
- // auto file_num = versions_->NewFileNumber();
1942
- // <do something>
1943
- // ReleaseFileNumberFromPendingOutputs(x)
1944
- // This will protect any file with number `file_num` or greater from being
1945
- // deleted while <do something> is running.
1946
- // -----------
1947
- // This function will capture current file number and append it to
1948
- // pending_outputs_. This will prevent any background process to delete any
1949
- // file created after this point.
1950
- std::list<uint64_t>::iterator CaptureCurrentFileNumberInPendingOutputs();
1951
- // This function should be called with the result of
1952
- // CaptureCurrentFileNumberInPendingOutputs(). It then marks that any file
1953
- // created between the calls CaptureCurrentFileNumberInPendingOutputs() and
1954
- // ReleaseFileNumberFromPendingOutputs() can now be deleted (if it's not live
1955
- // and blocked by any other pending_outputs_ calls)
1956
- void ReleaseFileNumberFromPendingOutputs(
1957
- std::unique_ptr<std::list<uint64_t>::iterator>& v);
1958
-
1959
- IOStatus SyncClosedWals(const WriteOptions& write_options,
1960
- JobContext* job_context, VersionEdit* synced_wals,
1961
- bool error_recovery_in_prog);
1962
-
1963
- // Flush the in-memory write buffer to storage. Switches to a new
1964
- // log-file/memtable and writes a new descriptor iff successful. Then
1965
- // installs a new super version for the column family.
1966
- Status FlushMemTableToOutputFile(
1967
- ColumnFamilyData* cfd, const MutableCFOptions& mutable_cf_options,
1968
- bool* madeProgress, JobContext* job_context, FlushReason flush_reason,
1969
- SuperVersionContext* superversion_context,
1970
- std::vector<SequenceNumber>& snapshot_seqs,
1971
- SequenceNumber earliest_write_conflict_snapshot,
1972
- SnapshotChecker* snapshot_checker, LogBuffer* log_buffer,
1973
- Env::Priority thread_pri);
1974
-
1975
- // Flush the memtables of (multiple) column families to multiple files on
1976
- // persistent storage.
1977
- Status FlushMemTablesToOutputFiles(
1978
- const autovector<BGFlushArg>& bg_flush_args, bool* made_progress,
1979
- JobContext* job_context, LogBuffer* log_buffer, Env::Priority thread_pri);
1980
-
1981
- Status AtomicFlushMemTablesToOutputFiles(
1982
- const autovector<BGFlushArg>& bg_flush_args, bool* made_progress,
1983
- JobContext* job_context, LogBuffer* log_buffer, Env::Priority thread_pri);
1984
-
1985
- // REQUIRES: log_numbers are sorted in ascending order
1986
- // corrupted_log_found is set to true if we recover from a corrupted log file.
1987
- Status RecoverLogFiles(const std::vector<uint64_t>& log_numbers,
1988
- SequenceNumber* next_sequence, bool read_only,
1989
- bool is_retry, bool* corrupted_log_found,
1990
- RecoveryContext* recovery_ctx);
1991
-
1992
- // The following two methods are used to flush a memtable to
1993
- // storage. The first one is used at database RecoveryTime (when the
1994
- // database is opened) and is heavyweight because it holds the mutex
1995
- // for the entire period. The second method WriteLevel0Table supports
1996
- // concurrent flush memtables to storage.
1997
- Status WriteLevel0TableForRecovery(int job_id, ColumnFamilyData* cfd,
1998
- MemTable* mem, VersionEdit* edit);
1999
-
2000
- // Get the size of a log file and, if truncate is true, truncate the
2001
- // log file to its actual size, thereby freeing preallocated space.
2002
- // Return success even if truncate fails
2003
- Status GetLogSizeAndMaybeTruncate(uint64_t wal_number, bool truncate,
2004
- LogFileNumberSize* log);
2005
-
2006
- // Restore alive_log_files_ and total_log_size_ after recovery.
2007
- // It needs to run only when there's no flush during recovery
2008
- // (e.g. avoid_flush_during_recovery=true). May also trigger flush
2009
- // in case total_log_size > max_total_wal_size.
2010
- Status RestoreAliveLogFiles(const std::vector<uint64_t>& log_numbers);
2011
-
2012
- // num_bytes: for slowdown case, delay time is calculated based on
2013
- // `num_bytes` going through.
2014
- Status DelayWrite(uint64_t num_bytes, WriteThread& write_thread,
2015
- const WriteOptions& write_options);
2016
-
2017
- // Begin stalling of writes when memory usage increases beyond a certain
2018
- // threshold.
2019
- void WriteBufferManagerStallWrites();
2020
-
2021
- Status ThrottleLowPriWritesIfNeeded(const WriteOptions& write_options,
2022
- WriteBatch* my_batch);
2023
-
2024
- // REQUIRES: mutex locked and in write thread.
2025
- Status ScheduleFlushes(WriteContext* context);
2026
-
2027
- void MaybeFlushStatsCF(autovector<ColumnFamilyData*>* cfds);
2028
-
2029
- Status TrimMemtableHistory(WriteContext* context);
2030
-
2031
- Status SwitchMemtable(ColumnFamilyData* cfd, WriteContext* context);
2032
-
2033
- // Select and output column families qualified for atomic flush in
2034
- // `selected_cfds`. If `provided_candidate_cfds` is non-empty, it will be used
2035
- // as candidate CFs to select qualified ones from. Otherwise, all column
2036
- // families are used as candidate to select from.
2037
- //
2038
- // REQUIRES: mutex held
2039
- void SelectColumnFamiliesForAtomicFlush(
2040
- autovector<ColumnFamilyData*>* selected_cfds,
2041
- const autovector<ColumnFamilyData*>& provided_candidate_cfds = {},
2042
- FlushReason flush_reason = FlushReason::kOthers);
2043
-
2044
- // Force current memtable contents to be flushed.
2045
- Status FlushMemTable(ColumnFamilyData* cfd, const FlushOptions& options,
2046
- FlushReason flush_reason,
2047
- bool entered_write_thread = false);
2048
-
2049
- // Atomic-flush memtables from quanlified CFs among `provided_candidate_cfds`
2050
- // (if non-empty) or amomg all column families and atomically record the
2051
- // result to the MANIFEST.
2052
- Status AtomicFlushMemTables(
2053
- const FlushOptions& options, FlushReason flush_reason,
2054
- const autovector<ColumnFamilyData*>& provided_candidate_cfds = {},
2055
- bool entered_write_thread = false);
2056
-
2057
- Status RetryFlushesForErrorRecovery(FlushReason flush_reason, bool wait);
2058
-
2059
- // Wait until flushing this column family won't stall writes
2060
- Status WaitUntilFlushWouldNotStallWrites(ColumnFamilyData* cfd,
2061
- bool* flush_needed);
2062
-
2063
- // Wait for memtable flushed.
2064
- // If flush_memtable_id is non-null, wait until the memtable with the ID
2065
- // gets flush. Otherwise, wait until the column family don't have any
2066
- // memtable pending flush.
2067
- // resuming_from_bg_err indicates whether the caller is attempting to resume
2068
- // from background error.
2069
- Status WaitForFlushMemTable(ColumnFamilyData* cfd,
2070
- const uint64_t* flush_memtable_id = nullptr,
2071
- bool resuming_from_bg_err = false) {
2072
- return WaitForFlushMemTables({cfd}, {flush_memtable_id},
2073
- resuming_from_bg_err);
2074
- }
2075
- // Wait for memtables to be flushed for multiple column families.
2076
- Status WaitForFlushMemTables(
2077
- const autovector<ColumnFamilyData*>& cfds,
2078
- const autovector<const uint64_t*>& flush_memtable_ids,
2079
- bool resuming_from_bg_err);
2080
-
2081
- inline void WaitForPendingWrites() {
2082
- mutex_.AssertHeld();
2083
- TEST_SYNC_POINT("DBImpl::WaitForPendingWrites:BeforeBlock");
2084
- // In case of pipelined write is enabled, wait for all pending memtable
2085
- // writers.
2086
- if (immutable_db_options_.enable_pipelined_write) {
2087
- // Memtable writers may call DB::Get in case max_successive_merges > 0,
2088
- // which may lock mutex. Unlocking mutex here to avoid deadlock.
2089
- mutex_.Unlock();
2090
- write_thread_.WaitForMemTableWriters();
2091
- mutex_.Lock();
2092
- }
2093
-
2094
- if (immutable_db_options_.unordered_write) {
2095
- // Wait for the ones who already wrote to the WAL to finish their
2096
- // memtable write.
2097
- if (pending_memtable_writes_.load() != 0) {
2098
- // XXX: suspicious wait while holding DB mutex?
2099
- std::unique_lock<std::mutex> guard(switch_mutex_);
2100
- switch_cv_.wait(guard,
2101
- [&] { return pending_memtable_writes_.load() == 0; });
2102
- }
2103
- } else {
2104
- // (Writes are finished before the next write group starts.)
2105
- }
2106
-
2107
- // Wait for any LockWAL to clear
2108
- while (lock_wal_count_ > 0) {
2109
- bg_cv_.Wait();
2110
- }
2111
- }
2112
-
2113
- // TaskType is used to identify tasks in thread-pool, currently only
2114
- // differentiate manual compaction, which could be unscheduled from the
2115
- // thread-pool.
2116
- enum class TaskType : uint8_t {
2117
- kDefault = 0,
2118
- kManualCompaction = 1,
2119
- kCount = 2,
2120
- };
2121
-
2122
- // Task tag is used to identity tasks in thread-pool, which is
2123
- // dbImpl obj address + type
2124
- inline void* GetTaskTag(TaskType type) {
2125
- return GetTaskTag(static_cast<uint8_t>(type));
2126
- }
2127
-
2128
- inline void* GetTaskTag(uint8_t type) {
2129
- return static_cast<uint8_t*>(static_cast<void*>(this)) + type;
2130
- }
2131
-
2132
- // REQUIRES: mutex locked and in write thread.
2133
- void AssignAtomicFlushSeq(const autovector<ColumnFamilyData*>& cfds);
2134
-
2135
- // REQUIRES: mutex locked and in write thread.
2136
- Status SwitchWAL(WriteContext* write_context);
2137
-
2138
- // REQUIRES: mutex locked and in write thread.
2139
- Status HandleWriteBufferManagerFlush(WriteContext* write_context);
2140
-
2141
- // REQUIRES: mutex locked
2142
- Status PreprocessWrite(const WriteOptions& write_options,
2143
- LogContext* log_context, WriteContext* write_context);
2144
-
2145
- // Merge write batches in the write group into merged_batch.
2146
- // Returns OK if merge is successful.
2147
- // Returns Corruption if corruption in write batch is detected.
2148
- Status MergeBatch(const WriteThread::WriteGroup& write_group,
2149
- WriteBatch* tmp_batch, WriteBatch** merged_batch,
2150
- size_t* write_with_wal, WriteBatch** to_be_cached_state);
2151
-
2152
- IOStatus WriteToWAL(const WriteBatch& merged_batch,
2153
- const WriteOptions& write_options,
2154
- log::Writer* log_writer, uint64_t* log_used,
2155
- uint64_t* log_size,
2156
- LogFileNumberSize& log_file_number_size);
2157
-
2158
- IOStatus WriteToWAL(const WriteThread::WriteGroup& write_group,
2159
- log::Writer* log_writer, uint64_t* log_used,
2160
- bool need_log_sync, bool need_log_dir_sync,
2161
- SequenceNumber sequence,
2162
- LogFileNumberSize& log_file_number_size);
2163
-
2164
- IOStatus ConcurrentWriteToWAL(const WriteThread::WriteGroup& write_group,
2165
- uint64_t* log_used,
2166
- SequenceNumber* last_sequence, size_t seq_inc);
2167
-
2168
- // Used by WriteImpl to update bg_error_ if paranoid check is enabled.
2169
- // Caller must hold mutex_.
2170
- void WriteStatusCheckOnLocked(const Status& status);
2171
-
2172
- // Used by WriteImpl to update bg_error_ if paranoid check is enabled.
2173
- void WriteStatusCheck(const Status& status);
2174
-
2175
- // Used by WriteImpl to update bg_error_ when IO error happens, e.g., write
2176
- // WAL, sync WAL fails, if paranoid check is enabled.
2177
- void IOStatusCheck(const IOStatus& status);
2178
-
2179
- // Used by WriteImpl to update bg_error_ in case of memtable insert error.
2180
- void MemTableInsertStatusCheck(const Status& memtable_insert_status);
2181
-
2182
- Status CompactFilesImpl(const CompactionOptions& compact_options,
2183
- ColumnFamilyData* cfd, Version* version,
2184
- const std::vector<std::string>& input_file_names,
2185
- std::vector<std::string>* const output_file_names,
2186
- const int output_level, int output_path_id,
2187
- JobContext* job_context, LogBuffer* log_buffer,
2188
- CompactionJobInfo* compaction_job_info);
2189
-
2190
- ColumnFamilyData* GetColumnFamilyDataByName(const std::string& cf_name);
2191
-
2192
- void MaybeScheduleFlushOrCompaction();
2193
-
2194
- struct FlushRequest {
2195
- FlushReason flush_reason;
2196
- // A map from column family to flush to largest memtable id to persist for
2197
- // each column family. Once all the memtables whose IDs are smaller than or
2198
- // equal to this per-column-family specified value, this flush request is
2199
- // considered to have completed its work of flushing this column family.
2200
- // After completing the work for all column families in this request, this
2201
- // flush is considered complete.
2202
- std::unordered_map<ColumnFamilyData*, uint64_t>
2203
- cfd_to_max_mem_id_to_persist;
2204
-
2205
- #ifndef NDEBUG
2206
- int reschedule_count = 1;
2207
- #endif /* !NDEBUG */
2208
- };
2209
-
2210
- // In case of atomic flush, generates a `FlushRequest` for the latest atomic
2211
- // cuts for these `cfds`. Atomic cuts are recorded in
2212
- // `AssignAtomicFlushSeq()`. For each entry in `cfds`, all CFDs sharing the
2213
- // same latest atomic cut must also be present.
2214
- //
2215
- // REQUIRES: mutex held
2216
- void GenerateFlushRequest(const autovector<ColumnFamilyData*>& cfds,
2217
- FlushReason flush_reason, FlushRequest* req);
2218
-
2219
- // Returns true if `req` is successfully enqueued.
2220
- bool SchedulePendingFlush(const FlushRequest& req);
2221
-
2222
- void SchedulePendingCompaction(ColumnFamilyData* cfd);
2223
- void SchedulePendingPurge(std::string fname, std::string dir_to_sync,
2224
- FileType type, uint64_t number, int job_id);
2225
- static void BGWorkCompaction(void* arg);
2226
- // Runs a pre-chosen universal compaction involving bottom level in a
2227
- // separate, bottom-pri thread pool.
2228
- static void BGWorkBottomCompaction(void* arg);
2229
- static void BGWorkFlush(void* arg);
2230
- static void BGWorkPurge(void* arg);
2231
- static void UnscheduleCompactionCallback(void* arg);
2232
- static void UnscheduleFlushCallback(void* arg);
2233
- void BackgroundCallCompaction(PrepickedCompaction* prepicked_compaction,
2234
- Env::Priority thread_pri);
2235
- void BackgroundCallFlush(Env::Priority thread_pri);
2236
- void BackgroundCallPurge();
2237
- Status BackgroundCompaction(bool* madeProgress, JobContext* job_context,
2238
- LogBuffer* log_buffer,
2239
- PrepickedCompaction* prepicked_compaction,
2240
- Env::Priority thread_pri);
2241
- Status BackgroundFlush(bool* madeProgress, JobContext* job_context,
2242
- LogBuffer* log_buffer, FlushReason* reason,
2243
- bool* flush_rescheduled_to_retain_udt,
2244
- Env::Priority thread_pri);
2245
-
2246
- bool EnoughRoomForCompaction(ColumnFamilyData* cfd,
2247
- const std::vector<CompactionInputFiles>& inputs,
2248
- bool* sfm_bookkeeping, LogBuffer* log_buffer);
2249
-
2250
- // Request compaction tasks token from compaction thread limiter.
2251
- // It always succeeds if force = true or limiter is disable.
2252
- bool RequestCompactionToken(ColumnFamilyData* cfd, bool force,
2253
- std::unique_ptr<TaskLimiterToken>* token,
2254
- LogBuffer* log_buffer);
2255
-
2256
- // Return true if the `FlushRequest` can be rescheduled to retain the UDT.
2257
- // Only true if there are user-defined timestamps in the involved MemTables
2258
- // with newer than cutoff timestamp `full_history_ts_low` and not flushing
2259
- // immediately will not cause entering write stall mode.
2260
- bool ShouldRescheduleFlushRequestToRetainUDT(const FlushRequest& flush_req);
2261
-
2262
- // Schedule background tasks
2263
- Status StartPeriodicTaskScheduler();
2264
-
2265
- // Cancel scheduled periodic tasks
2266
- Status CancelPeriodicTaskScheduler();
2267
-
2268
- Status RegisterRecordSeqnoTimeWorker(const ReadOptions& read_options,
2269
- const WriteOptions& write_options,
2270
- bool is_new_db);
2271
-
2272
- void PrintStatistics();
2273
-
2274
- size_t EstimateInMemoryStatsHistorySize() const;
2275
-
2276
- // Return the minimum empty level that could hold the total data in the
2277
- // input level. Return the input level, if such level could not be found.
2278
- int FindMinimumEmptyLevelFitting(ColumnFamilyData* cfd,
2279
- const MutableCFOptions& mutable_cf_options,
2280
- int level);
2281
-
2282
- // Move the files in the input level to the target level.
2283
- // If target_level < 0, automatically calculate the minimum level that could
2284
- // hold the data set.
2285
- Status ReFitLevel(ColumnFamilyData* cfd, int level, int target_level = -1);
2286
-
2287
- // helper functions for adding and removing from flush & compaction queues
2288
- void AddToCompactionQueue(ColumnFamilyData* cfd);
2289
- ColumnFamilyData* PopFirstFromCompactionQueue();
2290
- FlushRequest PopFirstFromFlushQueue();
2291
-
2292
- // Pick the first unthrottled compaction with task token from queue.
2293
- ColumnFamilyData* PickCompactionFromQueue(
2294
- std::unique_ptr<TaskLimiterToken>* token, LogBuffer* log_buffer);
2295
-
2296
- IOStatus SyncWalImpl(bool include_current_wal,
2297
- const WriteOptions& write_options,
2298
- JobContext* job_context, VersionEdit* synced_wals,
2299
- bool error_recovery_in_prog);
2300
-
2301
- // helper function to call after some of the logs_ were synced
2302
- void MarkLogsSynced(uint64_t up_to, bool synced_dir, VersionEdit* edit);
2303
- Status ApplyWALToManifest(const ReadOptions& read_options,
2304
- const WriteOptions& write_options,
2305
- VersionEdit* edit);
2306
- // WALs with log number up to up_to are not synced successfully.
2307
- void MarkLogsNotSynced(uint64_t up_to);
2308
-
2309
- SnapshotImpl* GetSnapshotImpl(bool is_write_conflict_boundary,
2310
- bool lock = true);
2311
-
2312
- // If snapshot_seq != kMaxSequenceNumber, then this function can only be
2313
- // called from the write thread that publishes sequence numbers to readers.
2314
- // For 1) write-committed, or 2) write-prepared + one-write-queue, this will
2315
- // be the write thread performing memtable writes. For write-prepared with
2316
- // two write queues, this will be the write thread writing commit marker to
2317
- // the WAL.
2318
- // If snapshot_seq == kMaxSequenceNumber, this function is called by a caller
2319
- // ensuring no writes to the database.
2320
- std::pair<Status, std::shared_ptr<const SnapshotImpl>>
2321
- CreateTimestampedSnapshotImpl(SequenceNumber snapshot_seq, uint64_t ts,
2322
- bool lock = true);
2323
-
2324
- uint64_t GetMaxTotalWalSize() const;
2325
-
2326
- FSDirectory* GetDataDir(ColumnFamilyData* cfd, size_t path_id) const;
2327
-
2328
- Status MaybeReleaseTimestampedSnapshotsAndCheck();
2329
-
2330
- Status CloseHelper();
2331
-
2332
- void WaitForBackgroundWork();
2333
-
2334
- // Background threads call this function, which is just a wrapper around
2335
- // the InstallSuperVersion() function. Background threads carry
2336
- // sv_context which can have new_superversion already
2337
- // allocated.
2338
- // All ColumnFamily state changes go through this function. Here we analyze
2339
- // the new state and we schedule background work if we detect that the new
2340
- // state needs flush or compaction.
2341
- void InstallSuperVersionAndScheduleWork(
2342
- ColumnFamilyData* cfd, SuperVersionContext* sv_context,
2343
- const MutableCFOptions& mutable_cf_options);
2344
-
2345
- bool GetIntPropertyInternal(ColumnFamilyData* cfd,
2346
- const DBPropertyInfo& property_info,
2347
- bool is_locked, uint64_t* value);
2348
- bool GetPropertyHandleOptionsStatistics(std::string* value);
2349
-
2350
- bool HasPendingManualCompaction();
2351
- bool HasExclusiveManualCompaction();
2352
- void AddManualCompaction(ManualCompactionState* m);
2353
- void RemoveManualCompaction(ManualCompactionState* m);
2354
- bool ShouldntRunManualCompaction(ManualCompactionState* m);
2355
- bool HaveManualCompaction(ColumnFamilyData* cfd);
2356
- bool MCOverlap(ManualCompactionState* m, ManualCompactionState* m1);
2357
- void UpdateDeletionCompactionStats(const std::unique_ptr<Compaction>& c);
2358
-
2359
- // May open and read table files for table property.
2360
- // Should not be called while holding mutex_.
2361
- void BuildCompactionJobInfo(const ColumnFamilyData* cfd, Compaction* c,
2362
- const Status& st,
2363
- const CompactionJobStats& compaction_job_stats,
2364
- const int job_id,
2365
- CompactionJobInfo* compaction_job_info) const;
2366
- // Reserve the next 'num' file numbers for to-be-ingested external SST files,
2367
- // and return the current file_number in 'next_file_number'.
2368
- // Write a version edit to the MANIFEST.
2369
- Status ReserveFileNumbersBeforeIngestion(
2370
- ColumnFamilyData* cfd, uint64_t num,
2371
- std::unique_ptr<std::list<uint64_t>::iterator>& pending_output_elem,
2372
- uint64_t* next_file_number);
2373
-
2374
- bool ShouldPurge(uint64_t file_number) const;
2375
- void MarkAsGrabbedForPurge(uint64_t file_number);
2376
-
2377
- size_t GetWalPreallocateBlockSize(uint64_t write_buffer_size) const;
2378
- Env::WriteLifeTimeHint CalculateWALWriteHint() { return Env::WLTH_SHORT; }
2379
-
2380
- IOStatus CreateWAL(const WriteOptions& write_options, uint64_t log_file_num,
2381
- uint64_t recycle_log_number, size_t preallocate_block_size,
2382
- log::Writer** new_log);
2383
-
2384
- // Validate self-consistency of DB options
2385
- static Status ValidateOptions(const DBOptions& db_options);
2386
- // Validate self-consistency of DB options and its consistency with cf options
2387
- static Status ValidateOptions(
2388
- const DBOptions& db_options,
2389
- const std::vector<ColumnFamilyDescriptor>& column_families);
2390
-
2391
- // Utility function to do some debug validation and sort the given vector
2392
- // of MultiGet keys
2393
- void PrepareMultiGetKeys(
2394
- const size_t num_keys, bool sorted,
2395
- autovector<KeyContext*, MultiGetContext::MAX_BATCH_SIZE>* key_ptrs);
2396
-
2397
- void MultiGetCommon(const ReadOptions& options,
2398
- ColumnFamilyHandle* column_family, const size_t num_keys,
2399
- const Slice* keys, PinnableSlice* values,
2400
- PinnableWideColumns* columns, std::string* timestamps,
2401
- Status* statuses, bool sorted_input);
2402
-
2403
- void MultiGetCommon(const ReadOptions& options, const size_t num_keys,
2404
- ColumnFamilyHandle** column_families, const Slice* keys,
2405
- PinnableSlice* values, PinnableWideColumns* columns,
2406
- std::string* timestamps, Status* statuses,
2407
- bool sorted_input);
2408
-
2409
- // A structure to hold the information required to process MultiGet of keys
2410
- // belonging to one column family. For a multi column family MultiGet, there
2411
- // will be a container of these objects.
2412
- struct MultiGetKeyRangePerCf {
2413
- // For the batched MultiGet which relies on sorted keys, start specifies
2414
- // the index of first key belonging to this column family in the sorted
2415
- // list.
2416
- size_t start;
2417
-
2418
- // For the batched MultiGet case, num_keys specifies the number of keys
2419
- // belonging to this column family in the sorted list
2420
- size_t num_keys;
2421
-
2422
- MultiGetKeyRangePerCf() : start(0), num_keys(0) {}
2423
-
2424
- MultiGetKeyRangePerCf(size_t first, size_t count)
2425
- : start(first), num_keys(count) {}
2426
- };
2427
-
2428
- // A structure to contain ColumnFamilyData and the SuperVersion obtained for
2429
- // the consistent view of DB
2430
- struct ColumnFamilySuperVersionPair {
2431
- ColumnFamilyHandleImpl* cfh;
2432
- ColumnFamilyData* cfd;
2433
-
2434
- // SuperVersion for the column family obtained in a manner that ensures a
2435
- // consistent view across all column families in the DB
2436
- SuperVersion* super_version;
2437
- ColumnFamilySuperVersionPair(ColumnFamilyHandle* column_family,
2438
- SuperVersion* sv)
2439
- : cfh(static_cast<ColumnFamilyHandleImpl*>(column_family)),
2440
- cfd(cfh->cfd()),
2441
- super_version(sv) {}
2442
-
2443
- ColumnFamilySuperVersionPair() = default;
2444
- };
2445
-
2446
- // A common function to obtain a consistent snapshot, which can be implicit
2447
- // if the user doesn't specify a snapshot in read_options, across
2448
- // multiple column families. It will attempt to get an implicit
2449
- // snapshot without acquiring the db_mutes, but will give up after a few
2450
- // tries and acquire the mutex if a memtable flush happens. The template
2451
- // allows both the batched and non-batched MultiGet to call this with
2452
- // either an std::unordered_map or autovector of column families.
2453
- //
2454
- // If callback is non-null, the callback is refreshed with the snapshot
2455
- // sequence number
2456
- //
2457
- // `extra_sv_ref` is used to indicate whether thread-local SuperVersion
2458
- // should be obtained with an extra ref (by GetReferencedSuperVersion()) or
2459
- // not (by GetAndRefSuperVersion()). For instance, point lookup like MultiGet
2460
- // does not require SuperVersion to be re-acquired throughout the entire
2461
- // invocation (no need extra ref), while MultiCfIterators may need the
2462
- // SuperVersion to be updated during Refresh() (requires extra ref).
2463
- //
2464
- // `sv_from_thread_local` being set to false indicates that the SuperVersion
2465
- // obtained from the ColumnFamilyData, whereas true indicates they are thread
2466
- // local.
2467
- //
2468
- // A non-OK status will be returned if for a column family that enables
2469
- // user-defined timestamp feature, the specified `ReadOptions.timestamp`
2470
- // attemps to read collapsed history.
2471
- template <class T, typename IterDerefFuncType>
2472
- Status MultiCFSnapshot(const ReadOptions& read_options,
2473
- ReadCallback* callback,
2474
- IterDerefFuncType iter_deref_func, T* cf_list,
2475
- bool extra_sv_ref, SequenceNumber* snapshot,
2476
- bool* sv_from_thread_local);
2477
-
2478
- // The actual implementation of the batching MultiGet. The caller is expected
2479
- // to have acquired the SuperVersion and pass in a snapshot sequence number
2480
- // in order to construct the LookupKeys. The start_key and num_keys specify
2481
- // the range of keys in the sorted_keys vector for a single column family.
2482
- Status MultiGetImpl(
2483
- const ReadOptions& read_options, size_t start_key, size_t num_keys,
2484
- autovector<KeyContext*, MultiGetContext::MAX_BATCH_SIZE>* sorted_keys,
2485
- SuperVersion* sv, SequenceNumber snap_seqnum, ReadCallback* callback);
2486
-
2487
- void MultiGetWithCallbackImpl(
2488
- const ReadOptions& read_options, ColumnFamilyHandle* column_family,
2489
- ReadCallback* callback,
2490
- autovector<KeyContext*, MultiGetContext::MAX_BATCH_SIZE>* sorted_keys);
2491
-
2492
- Status DisableFileDeletionsWithLock();
2493
-
2494
- Status IncreaseFullHistoryTsLowImpl(ColumnFamilyData* cfd,
2495
- std::string ts_low);
2496
-
2497
- bool ShouldReferenceSuperVersion(const MergeContext& merge_context);
2498
-
2499
- template <typename IterType, typename ImplType,
2500
- typename ErrorIteratorFuncType>
2501
- std::unique_ptr<IterType> NewMultiCfIterator(
2502
- const ReadOptions& _read_options,
2503
- const std::vector<ColumnFamilyHandle*>& column_families,
2504
- ErrorIteratorFuncType error_iterator_func);
2505
-
2506
- // Lock over the persistent DB state. Non-nullptr iff successfully acquired.
2507
- FileLock* db_lock_;
2508
-
2509
- // Guards changes to DB and CF options to ensure consistency between
2510
- // * In-memory options objects
2511
- // * Settings in effect
2512
- // * Options file contents
2513
- // while allowing the DB mutex to be released during slow operations like
2514
- // persisting options file or modifying global periodic task timer.
2515
- // Always acquired *before* DB mutex when this one is applicable.
2516
- InstrumentedMutex options_mutex_;
2517
-
2518
- // Guards reads and writes to in-memory stats_history_.
2519
- InstrumentedMutex stats_history_mutex_;
2520
-
2521
- // In addition to mutex_, log_write_mutex_ protects writes to logs_ and
2522
- // logfile_number_. With two_write_queues it also protects alive_log_files_,
2523
- // and log_empty_. Refer to the definition of each variable below for more
2524
- // details.
2525
- // Note: to avoid deadlock, if needed to acquire both log_write_mutex_ and
2526
- // mutex_, the order should be first mutex_ and then log_write_mutex_.
2527
- InstrumentedMutex log_write_mutex_;
2528
-
2529
- // If zero, manual compactions are allowed to proceed. If non-zero, manual
2530
- // compactions may still be running, but will quickly fail with
2531
- // `Status::Incomplete`. The value indicates how many threads have paused
2532
- // manual compactions. It is accessed in read mode outside the DB mutex in
2533
- // compaction code paths.
2534
- std::atomic<int> manual_compaction_paused_;
2535
-
2536
- // This condition variable is signaled on these conditions:
2537
- // * whenever bg_compaction_scheduled_ goes down to 0
2538
- // * if AnyManualCompaction, whenever a compaction finishes, even if it hasn't
2539
- // made any progress
2540
- // * whenever a compaction made any progress
2541
- // * whenever bg_flush_scheduled_ or bg_purge_scheduled_ value decreases
2542
- // (i.e. whenever a flush is done, even if it didn't make any progress)
2543
- // * whenever there is an error in background purge, flush or compaction
2544
- // * whenever num_running_ingest_file_ goes to 0.
2545
- // * whenever pending_purge_obsolete_files_ goes to 0.
2546
- // * whenever disable_delete_obsolete_files_ goes to 0.
2547
- // * whenever SetOptions successfully updates options.
2548
- // * whenever a column family is dropped.
2549
- InstrumentedCondVar bg_cv_;
2550
- // Writes are protected by locking both mutex_ and log_write_mutex_, and reads
2551
- // must be under either mutex_ or log_write_mutex_. Since after ::Open,
2552
- // logfile_number_ is currently updated only in write_thread_, it can be read
2553
- // from the same write_thread_ without any locks.
2554
- uint64_t logfile_number_;
2555
- // Log files that we can recycle. Must be protected by db mutex_.
2556
- std::deque<uint64_t> log_recycle_files_;
2557
- // The minimum log file number taht can be recycled, if log recycling is
2558
- // enabled. This is used to ensure that log files created by previous
2559
- // instances of the database are not recycled, as we cannot be sure they
2560
- // were created in the recyclable format.
2561
- uint64_t min_log_number_to_recycle_;
2562
- // Protected by log_write_mutex_.
2563
- bool log_dir_synced_;
2564
- // Without two_write_queues, read and writes to log_empty_ are protected by
2565
- // mutex_. Since it is currently updated/read only in write_thread_, it can be
2566
- // accessed from the same write_thread_ without any locks. With
2567
- // two_write_queues writes, where it can be updated in different threads,
2568
- // read and writes are protected by log_write_mutex_ instead. This is to avoid
2569
- // expensive mutex_ lock during WAL write, which update log_empty_.
2570
- bool log_empty_;
2571
-
2572
- ColumnFamilyHandleImpl* persist_stats_cf_handle_;
2573
-
2574
- bool persistent_stats_cfd_exists_ = true;
2575
-
2576
- // The current WAL file and those that have not been found obsolete from
2577
- // memtable flushes. A WAL not on this list might still be pending writer
2578
- // flush and/or sync and close and might still be in logs_. alive_log_files_
2579
- // is protected by mutex_ and log_write_mutex_ with details as follows:
2580
- // 1. read by FindObsoleteFiles() which can be called in either application
2581
- // thread or RocksDB bg threads, both mutex_ and log_write_mutex_ are
2582
- // held.
2583
- // 2. pop_front() by FindObsoleteFiles(), both mutex_ and log_write_mutex_
2584
- // are held.
2585
- // 3. push_back() by DBImpl::Open() and DBImpl::RestoreAliveLogFiles()
2586
- // (actually called by Open()), only mutex_ is held because at this point,
2587
- // the DB::Open() call has not returned success to application, and the
2588
- // only other thread(s) that can conflict are bg threads calling
2589
- // FindObsoleteFiles() which ensure that both mutex_ and log_write_mutex_
2590
- // are held when accessing alive_log_files_.
2591
- // 4. read by DBImpl::Open() is protected by mutex_.
2592
- // 5. push_back() by SwitchMemtable(). Both mutex_ and log_write_mutex_ are
2593
- // held. This is done by the write group leader. Note that in the case of
2594
- // two-write-queues, another WAL-only write thread can be writing to the
2595
- // WAL concurrently. See 9.
2596
- // 6. read by SwitchWAL() with both mutex_ and log_write_mutex_ held. This is
2597
- // done by write group leader.
2598
- // 7. read by ConcurrentWriteToWAL() by the write group leader in the case of
2599
- // two-write-queues. Only log_write_mutex_ is held to protect concurrent
2600
- // pop_front() by FindObsoleteFiles().
2601
- // 8. read by PreprocessWrite() by the write group leader. log_write_mutex_
2602
- // is held to protect the data structure from concurrent pop_front() by
2603
- // FindObsoleteFiles().
2604
- // 9. read by ConcurrentWriteToWAL() by a WAL-only write thread in the case
2605
- // of two-write-queues. Only log_write_mutex_ is held. This suffices to
2606
- // protect the data structure from concurrent push_back() by current
2607
- // write group leader as well as pop_front() by FindObsoleteFiles().
2608
- std::deque<LogFileNumberSize> alive_log_files_;
2609
-
2610
- // Log files that aren't fully synced, and the current log file.
2611
- // Synchronization:
2612
- // 1. read by FindObsoleteFiles() which can be called either in application
2613
- // thread or RocksDB bg threads. log_write_mutex_ is always held, while
2614
- // some reads are performed without mutex_.
2615
- // 2. pop_front() by FindObsoleteFiles() with only log_write_mutex_ held.
2616
- // 3. read by DBImpl::Open() with both mutex_ and log_write_mutex_.
2617
- // 4. emplace_back() by DBImpl::Open() with both mutex_ and log_write_mutex.
2618
- // Note that at this point, DB::Open() has not returned success to
2619
- // application, thus the only other thread(s) that can conflict are bg
2620
- // threads calling FindObsoleteFiles(). See 1.
2621
- // 5. iteration and clear() from CloseHelper() always hold log_write_mutex
2622
- // and mutex_.
2623
- // 6. back() called by APIs FlushWAL() and LockWAL() are protected by only
2624
- // log_write_mutex_. These two can be called by application threads after
2625
- // DB::Open() returns success to applications.
2626
- // 7. read by SyncWAL(), another API, protected by only log_write_mutex_.
2627
- // 8. read by MarkLogsNotSynced() and MarkLogsSynced() are protected by
2628
- // log_write_mutex_.
2629
- // 9. erase() by MarkLogsSynced() protected by log_write_mutex_.
2630
- // 10. read by SyncClosedWals() protected by only log_write_mutex_. This can
2631
- // happen in bg flush threads after DB::Open() returns success to
2632
- // applications.
2633
- // 11. reads, e.g. front(), iteration, and back() called by PreprocessWrite()
2634
- // holds only the log_write_mutex_. This is done by the write group
2635
- // leader. A bg thread calling FindObsoleteFiles() or MarkLogsSynced()
2636
- // can happen concurrently. This is fine because log_write_mutex_ is used
2637
- // by all parties. See 2, 5, 9.
2638
- // 12. reads, empty(), back() called by SwitchMemtable() hold both mutex_ and
2639
- // log_write_mutex_. This happens in the write group leader.
2640
- // 13. emplace_back() by SwitchMemtable() hold both mutex_ and
2641
- // log_write_mutex_. This happens in the write group leader. Can conflict
2642
- // with bg threads calling FindObsoleteFiles(), MarkLogsSynced(),
2643
- // SyncClosedWals(), etc. as well as application threads calling
2644
- // FlushWAL(), SyncWAL(), LockWAL(). This is fine because all parties
2645
- // require at least log_write_mutex_.
2646
- // 14. iteration called in WriteToWAL(write_group) protected by
2647
- // log_write_mutex_. This is done by write group leader when
2648
- // two-write-queues is disabled and write needs to sync logs.
2649
- // 15. back() called in ConcurrentWriteToWAL() protected by log_write_mutex_.
2650
- // This can be done by the write group leader if two-write-queues is
2651
- // enabled. It can also be done by another WAL-only write thread.
2652
- //
2653
- // Other observations:
2654
- // - back() and items with getting_synced=true are not popped,
2655
- // - The same thread that sets getting_synced=true will reset it.
2656
- // - it follows that the object referred by back() can be safely read from
2657
- // the write_thread_ without using mutex. Note that calling back() without
2658
- // mutex may be unsafe because different implementations of deque::back() may
2659
- // access other member variables of deque, causing undefined behaviors.
2660
- // Generally, do not access stl containers without proper synchronization.
2661
- // - it follows that the items with getting_synced=true can be safely read
2662
- // from the same thread that has set getting_synced=true
2663
- std::deque<LogWriterNumber> logs_;
2664
-
2665
- // Signaled when getting_synced becomes false for some of the logs_.
2666
- InstrumentedCondVar log_sync_cv_;
2667
- // This is the app-level state that is written to the WAL but will be used
2668
- // only during recovery. Using this feature enables not writing the state to
2669
- // memtable on normal writes and hence improving the throughput. Each new
2670
- // write of the state will replace the previous state entirely even if the
2671
- // keys in the two consecutive states do not overlap.
2672
- // It is protected by log_write_mutex_ when two_write_queues_ is enabled.
2673
- // Otherwise only the heaad of write_thread_ can access it.
2674
- WriteBatch cached_recoverable_state_;
2675
- std::atomic<bool> cached_recoverable_state_empty_ = {true};
2676
- std::atomic<uint64_t> total_log_size_;
2677
-
2678
- // If this is non-empty, we need to delete these log files in background
2679
- // threads. Protected by log_write_mutex_.
2680
- autovector<log::Writer*> logs_to_free_;
2681
-
2682
- bool is_snapshot_supported_;
2683
-
2684
- std::map<uint64_t, std::map<std::string, uint64_t>> stats_history_;
2685
-
2686
- std::map<std::string, uint64_t> stats_slice_;
2687
-
2688
- bool stats_slice_initialized_ = false;
2689
-
2690
- Directories directories_;
2691
-
2692
- WriteBufferManager* write_buffer_manager_;
2693
-
2694
- WriteThread write_thread_;
2695
- WriteBatch tmp_batch_;
2696
- // The write thread when the writers have no memtable write. This will be used
2697
- // in 2PC to batch the prepares separately from the serial commit.
2698
- WriteThread nonmem_write_thread_;
2699
-
2700
- WriteController write_controller_;
2701
-
2702
- // Size of the last batch group. In slowdown mode, next write needs to
2703
- // sleep if it uses up the quota.
2704
- // Note: This is to protect memtable and compaction. If the batch only writes
2705
- // to the WAL its size need not to be included in this.
2706
- uint64_t last_batch_group_size_;
2707
-
2708
- FlushScheduler flush_scheduler_;
2709
-
2710
- TrimHistoryScheduler trim_history_scheduler_;
2711
-
2712
- SnapshotList snapshots_;
2713
-
2714
- TimestampedSnapshotList timestamped_snapshots_;
2715
-
2716
- // For each background job, pending_outputs_ keeps the current file number at
2717
- // the time that background job started.
2718
- // FindObsoleteFiles()/PurgeObsoleteFiles() never deletes any file that has
2719
- // number bigger than any of the file number in pending_outputs_. Since file
2720
- // numbers grow monotonically, this also means that pending_outputs_ is always
2721
- // sorted. After a background job is done executing, its file number is
2722
- // deleted from pending_outputs_, which allows PurgeObsoleteFiles() to clean
2723
- // it up.
2724
- // State is protected with db mutex.
2725
- std::list<uint64_t> pending_outputs_;
2726
-
2727
- // flush_queue_ and compaction_queue_ hold column families that we need to
2728
- // flush and compact, respectively.
2729
- // A column family is inserted into flush_queue_ when it satisfies condition
2730
- // cfd->imm()->IsFlushPending()
2731
- // A column family is inserted into compaction_queue_ when it satisfied
2732
- // condition cfd->NeedsCompaction()
2733
- // Column families in this list are all Ref()-erenced
2734
- // TODO(icanadi) Provide some kind of ReferencedColumnFamily class that will
2735
- // do RAII on ColumnFamilyData
2736
- // Column families are in this queue when they need to be flushed or
2737
- // compacted. Consumers of these queues are flush and compaction threads. When
2738
- // column family is put on this queue, we increase unscheduled_flushes_ and
2739
- // unscheduled_compactions_. When these variables are bigger than zero, that
2740
- // means we need to schedule background threads for flush and compaction.
2741
- // Once the background threads are scheduled, we decrease unscheduled_flushes_
2742
- // and unscheduled_compactions_. That way we keep track of number of
2743
- // compaction and flush threads we need to schedule. This scheduling is done
2744
- // in MaybeScheduleFlushOrCompaction()
2745
- // invariant(column family present in flush_queue_ <==>
2746
- // ColumnFamilyData::pending_flush_ == true)
2747
- std::deque<FlushRequest> flush_queue_;
2748
- // invariant(column family present in compaction_queue_ <==>
2749
- // ColumnFamilyData::pending_compaction_ == true)
2750
- std::deque<ColumnFamilyData*> compaction_queue_;
2751
-
2752
- // A map to store file numbers and filenames of the files to be purged
2753
- std::unordered_map<uint64_t, PurgeFileInfo> purge_files_;
2754
-
2755
- // A vector to store the file numbers that have been assigned to certain
2756
- // JobContext. Current implementation tracks table and blob files only.
2757
- std::unordered_set<uint64_t> files_grabbed_for_purge_;
2758
-
2759
- // A queue to store log writers to close. Protected by db mutex_.
2760
- std::deque<log::Writer*> logs_to_free_queue_;
2761
-
2762
- std::deque<SuperVersion*> superversions_to_free_queue_;
2763
-
2764
- int unscheduled_flushes_;
2765
-
2766
- int unscheduled_compactions_;
2767
-
2768
- // count how many background compactions are running or have been scheduled in
2769
- // the BOTTOM pool
2770
- int bg_bottom_compaction_scheduled_;
2771
-
2772
- // count how many background compactions are running or have been scheduled
2773
- int bg_compaction_scheduled_;
2774
-
2775
- // stores the number of compactions are currently running
2776
- int num_running_compactions_;
2777
-
2778
- // number of background memtable flush jobs, submitted to the HIGH pool
2779
- int bg_flush_scheduled_;
2780
-
2781
- // stores the number of flushes are currently running
2782
- int num_running_flushes_;
2783
-
2784
- // number of background obsolete file purge jobs, submitted to the HIGH pool
2785
- int bg_purge_scheduled_;
2786
-
2787
- std::deque<ManualCompactionState*> manual_compaction_dequeue_;
2788
-
2789
- // shall we disable deletion of obsolete files
2790
- // if 0 the deletion is enabled.
2791
- // if non-zero, files will not be getting deleted
2792
- // This enables two different threads to call
2793
- // EnableFileDeletions() and DisableFileDeletions()
2794
- // without any synchronization
2795
- int disable_delete_obsolete_files_;
2796
-
2797
- // Number of times FindObsoleteFiles has found deletable files and the
2798
- // corresponding call to PurgeObsoleteFiles has not yet finished.
2799
- int pending_purge_obsolete_files_;
2800
-
2801
- // last time when DeleteObsoleteFiles with full scan was executed. Originally
2802
- // initialized with startup time.
2803
- uint64_t delete_obsolete_files_last_run_;
2804
-
2805
- // The thread that wants to switch memtable, can wait on this cv until the
2806
- // pending writes to memtable finishes.
2807
- std::condition_variable switch_cv_;
2808
- // The mutex used by switch_cv_. mutex_ should be acquired beforehand.
2809
- std::mutex switch_mutex_;
2810
- // Number of threads intending to write to memtable
2811
- std::atomic<size_t> pending_memtable_writes_ = {};
2812
-
2813
- // A flag indicating whether the current rocksdb database has any
2814
- // data that is not yet persisted into either WAL or SST file.
2815
- // Used when disableWAL is true.
2816
- std::atomic<bool> has_unpersisted_data_;
2817
-
2818
- // if an attempt was made to flush all column families that
2819
- // the oldest log depends on but uncommitted data in the oldest
2820
- // log prevents the log from being released.
2821
- // We must attempt to free the dependent memtables again
2822
- // at a later time after the transaction in the oldest
2823
- // log is fully commited.
2824
- bool unable_to_release_oldest_log_;
2825
-
2826
- // Number of running IngestExternalFile() or CreateColumnFamilyWithImport()
2827
- // calls.
2828
- // REQUIRES: mutex held
2829
- int num_running_ingest_file_;
2830
-
2831
- WalManager wal_manager_;
2832
-
2833
- // A value of > 0 temporarily disables scheduling of background work
2834
- int bg_work_paused_;
2835
-
2836
- // A value of > 0 temporarily disables scheduling of background compaction
2837
- int bg_compaction_paused_;
2838
-
2839
- // Guard against multiple concurrent refitting
2840
- bool refitting_level_;
2841
-
2842
- // Indicate DB was opened successfully
2843
- bool opened_successfully_;
2844
-
2845
- // The min threshold to triggere bottommost compaction for removing
2846
- // garbages, among all column families.
2847
- SequenceNumber bottommost_files_mark_threshold_ = kMaxSequenceNumber;
2848
-
2849
- LogsWithPrepTracker logs_with_prep_tracker_;
2850
-
2851
- // Callback for compaction to check if a key is visible to a snapshot.
2852
- // REQUIRES: mutex held
2853
- std::unique_ptr<SnapshotChecker> snapshot_checker_;
2854
-
2855
- // Callback for when the cached_recoverable_state_ is written to memtable
2856
- // Only to be set during initialization
2857
- std::unique_ptr<PreReleaseCallback> recoverable_state_pre_release_callback_;
2858
-
2859
- // Scheduler to run DumpStats(), PersistStats(), and FlushInfoLog().
2860
- // Currently, internally it has a global timer instance for running the tasks.
2861
- PeriodicTaskScheduler periodic_task_scheduler_;
2862
-
2863
- // It contains the implementations for each periodic task.
2864
- std::map<PeriodicTaskType, const PeriodicTaskFunc> periodic_task_functions_;
2865
-
2866
- // When set, we use a separate queue for writes that don't write to memtable.
2867
- // In 2PC these are the writes at Prepare phase.
2868
- const bool two_write_queues_;
2869
- const bool manual_wal_flush_;
2870
-
2871
- // LastSequence also indicates last published sequence visibile to the
2872
- // readers. Otherwise LastPublishedSequence should be used.
2873
- const bool last_seq_same_as_publish_seq_;
2874
- // It indicates that a customized gc algorithm must be used for
2875
- // flush/compaction and if it is not provided vis SnapshotChecker, we should
2876
- // disable gc to be safe.
2877
- const bool use_custom_gc_;
2878
- // Flag to indicate that the DB instance shutdown has been initiated. This
2879
- // different from shutting_down_ atomic in that it is set at the beginning
2880
- // of shutdown sequence, specifically in order to prevent any background
2881
- // error recovery from going on in parallel. The latter, shutting_down_,
2882
- // is set a little later during the shutdown after scheduling memtable
2883
- // flushes
2884
- std::atomic<bool> shutdown_initiated_;
2885
- // Flag to indicate whether sst_file_manager object was allocated in
2886
- // DB::Open() or passed to us
2887
- bool own_sfm_;
2888
-
2889
- // Flag to check whether Close() has been called on this DB
2890
- bool closed_;
2891
- // save the closing status, for re-calling the close()
2892
- Status closing_status_;
2893
- // mutex for DB::Close()
2894
- InstrumentedMutex closing_mutex_;
2895
-
2896
- // Conditional variable to coordinate installation of atomic flush results.
2897
- // With atomic flush, each bg thread installs the result of flushing multiple
2898
- // column families, and different threads can flush different column
2899
- // families. It's difficult to rely on one thread to perform batch
2900
- // installation for all threads. This is different from the non-atomic flush
2901
- // case.
2902
- // atomic_flush_install_cv_ makes sure that threads install atomic flush
2903
- // results sequentially. Flush results of memtables with lower IDs get
2904
- // installed to MANIFEST first.
2905
- InstrumentedCondVar atomic_flush_install_cv_;
2906
-
2907
- bool wal_in_db_path_;
2908
- std::atomic<uint64_t> max_total_wal_size_;
2909
-
2910
- BlobFileCompletionCallback blob_callback_;
2911
-
2912
- // Pointer to WriteBufferManager stalling interface.
2913
- std::unique_ptr<StallInterface> wbm_stall_;
2914
-
2915
- // seqno_to_time_mapping_ stores the sequence number to time mapping, it's not
2916
- // thread safe, both read and write need db mutex hold.
2917
- SeqnoToTimeMapping seqno_to_time_mapping_;
2918
-
2919
- // Stop write token that is acquired when first LockWAL() is called.
2920
- // Destroyed when last UnlockWAL() is called. Controlled by DB mutex.
2921
- // See lock_wal_count_
2922
- std::unique_ptr<WriteControllerToken> lock_wal_write_token_;
2923
-
2924
- // The number of LockWAL called without matching UnlockWAL call.
2925
- // See also lock_wal_write_token_
2926
- uint32_t lock_wal_count_;
2927
- };
2928
-
2929
- class GetWithTimestampReadCallback : public ReadCallback {
2930
- public:
2931
- explicit GetWithTimestampReadCallback(SequenceNumber seq)
2932
- : ReadCallback(seq) {}
2933
- bool IsVisibleFullCheck(SequenceNumber seq) override {
2934
- return seq <= max_visible_seq_;
2935
- }
2936
- };
2937
-
2938
- Options SanitizeOptions(const std::string& db, const Options& src,
2939
- bool read_only = false,
2940
- Status* logger_creation_s = nullptr);
2941
-
2942
- DBOptions SanitizeOptions(const std::string& db, const DBOptions& src,
2943
- bool read_only = false,
2944
- Status* logger_creation_s = nullptr);
2945
-
2946
- CompressionType GetCompressionFlush(const ImmutableCFOptions& ioptions,
2947
- const MutableCFOptions& mutable_cf_options);
2948
-
2949
- // Return the earliest log file to keep after the memtable flush is
2950
- // finalized.
2951
- // `cfd_to_flush` is the column family whose memtable (specified in
2952
- // `memtables_to_flush`) will be flushed and thus will not depend on any WAL
2953
- // file.
2954
- // The function is only applicable to 2pc mode.
2955
- uint64_t PrecomputeMinLogNumberToKeep2PC(
2956
- VersionSet* vset, const ColumnFamilyData& cfd_to_flush,
2957
- const autovector<VersionEdit*>& edit_list,
2958
- const autovector<MemTable*>& memtables_to_flush,
2959
- LogsWithPrepTracker* prep_tracker);
2960
- // For atomic flush.
2961
- uint64_t PrecomputeMinLogNumberToKeep2PC(
2962
- VersionSet* vset, const autovector<ColumnFamilyData*>& cfds_to_flush,
2963
- const autovector<autovector<VersionEdit*>>& edit_lists,
2964
- const autovector<const autovector<MemTable*>*>& memtables_to_flush,
2965
- LogsWithPrepTracker* prep_tracker);
2966
-
2967
- // In non-2PC mode, WALs with log number < the returned number can be
2968
- // deleted after the cfd_to_flush column family is flushed successfully.
2969
- uint64_t PrecomputeMinLogNumberToKeepNon2PC(
2970
- VersionSet* vset, const ColumnFamilyData& cfd_to_flush,
2971
- const autovector<VersionEdit*>& edit_list);
2972
- // For atomic flush.
2973
- uint64_t PrecomputeMinLogNumberToKeepNon2PC(
2974
- VersionSet* vset, const autovector<ColumnFamilyData*>& cfds_to_flush,
2975
- const autovector<autovector<VersionEdit*>>& edit_lists);
2976
-
2977
- // `cfd_to_flush` is the column family whose memtable will be flushed and thus
2978
- // will not depend on any WAL file. nullptr means no memtable is being flushed.
2979
- // The function is only applicable to 2pc mode.
2980
- uint64_t FindMinPrepLogReferencedByMemTable(
2981
- VersionSet* vset, const autovector<MemTable*>& memtables_to_flush);
2982
- // For atomic flush.
2983
- uint64_t FindMinPrepLogReferencedByMemTable(
2984
- VersionSet* vset,
2985
- const autovector<const autovector<MemTable*>*>& memtables_to_flush);
2986
-
2987
- // Fix user-supplied options to be reasonable
2988
- template <class T, class V>
2989
- static void ClipToRange(T* ptr, V minvalue, V maxvalue) {
2990
- if (static_cast<V>(*ptr) > maxvalue) *ptr = maxvalue;
2991
- if (static_cast<V>(*ptr) < minvalue) *ptr = minvalue;
2992
- }
2993
-
2994
- inline Status DBImpl::FailIfCfHasTs(
2995
- const ColumnFamilyHandle* column_family) const {
2996
- if (!column_family) {
2997
- return Status::InvalidArgument("column family handle cannot be null");
2998
- }
2999
- assert(column_family);
3000
- const Comparator* const ucmp = column_family->GetComparator();
3001
- assert(ucmp);
3002
- if (ucmp->timestamp_size() > 0) {
3003
- std::ostringstream oss;
3004
- oss << "cannot call this method on column family "
3005
- << column_family->GetName() << " that enables timestamp";
3006
- return Status::InvalidArgument(oss.str());
3007
- }
3008
- return Status::OK();
3009
- }
3010
-
3011
- inline Status DBImpl::FailIfTsMismatchCf(ColumnFamilyHandle* column_family,
3012
- const Slice& ts) const {
3013
- if (!column_family) {
3014
- return Status::InvalidArgument("column family handle cannot be null");
3015
- }
3016
- assert(column_family);
3017
- const Comparator* const ucmp = column_family->GetComparator();
3018
- assert(ucmp);
3019
- if (0 == ucmp->timestamp_size()) {
3020
- std::stringstream oss;
3021
- oss << "cannot call this method on column family "
3022
- << column_family->GetName() << " that does not enable timestamp";
3023
- return Status::InvalidArgument(oss.str());
3024
- }
3025
- const size_t ts_sz = ts.size();
3026
- if (ts_sz != ucmp->timestamp_size()) {
3027
- std::stringstream oss;
3028
- oss << "Timestamp sizes mismatch: expect " << ucmp->timestamp_size() << ", "
3029
- << ts_sz << " given";
3030
- return Status::InvalidArgument(oss.str());
3031
- }
3032
- return Status::OK();
3033
- }
3034
-
3035
- inline Status DBImpl::FailIfReadCollapsedHistory(const ColumnFamilyData* cfd,
3036
- const SuperVersion* sv,
3037
- const Slice& ts) const {
3038
- // Reaching to this point means the timestamp size matching sanity check in
3039
- // `DBImpl::FailIfTsMismatchCf` already passed. So we skip that and assume
3040
- // column family has the same user-defined timestamp format as `ts`.
3041
- const Comparator* const ucmp = cfd->user_comparator();
3042
- assert(ucmp);
3043
- const std::string& full_history_ts_low = sv->full_history_ts_low;
3044
- assert(full_history_ts_low.empty() ||
3045
- full_history_ts_low.size() == ts.size());
3046
- if (!full_history_ts_low.empty() &&
3047
- ucmp->CompareTimestamp(ts, full_history_ts_low) < 0) {
3048
- std::stringstream oss;
3049
- oss << "Read timestamp: " << ucmp->TimestampToString(ts)
3050
- << " is smaller than full_history_ts_low: "
3051
- << ucmp->TimestampToString(full_history_ts_low) << std::endl;
3052
- return Status::InvalidArgument(oss.str());
3053
- }
3054
- return Status::OK();
3055
- }
3056
- } // namespace ROCKSDB_NAMESPACE