rocksdb-native 2.6.3 → 2.6.5

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 (958) hide show
  1. package/CMakeLists.txt +10 -1
  2. package/package.json +3 -3
  3. package/prebuilds/android-arm64/rocksdb-native.bare +0 -0
  4. package/prebuilds/android-ia32/rocksdb-native.bare +0 -0
  5. package/prebuilds/android-x64/rocksdb-native.bare +0 -0
  6. package/prebuilds/darwin-arm64/rocksdb-native.bare +0 -0
  7. package/prebuilds/darwin-arm64/rocksdb-native.node +0 -0
  8. package/prebuilds/darwin-x64/rocksdb-native.bare +0 -0
  9. package/prebuilds/darwin-x64/rocksdb-native.node +0 -0
  10. package/prebuilds/ios-arm64/rocksdb-native.bare +0 -0
  11. package/prebuilds/ios-arm64-simulator/rocksdb-native.bare +0 -0
  12. package/prebuilds/ios-x64-simulator/rocksdb-native.bare +0 -0
  13. package/prebuilds/linux-arm64/rocksdb-native.bare +0 -0
  14. package/prebuilds/linux-arm64/rocksdb-native.node +0 -0
  15. package/prebuilds/linux-x64/rocksdb-native.bare +0 -0
  16. package/prebuilds/linux-x64/rocksdb-native.node +0 -0
  17. package/prebuilds/win32-arm64/rocksdb-native.bare +0 -0
  18. package/prebuilds/win32-arm64/rocksdb-native.node +0 -0
  19. package/prebuilds/win32-x64/rocksdb-native.bare +0 -0
  20. package/prebuilds/win32-x64/rocksdb-native.node +0 -0
  21. package/vendor/librocksdb/CMakeLists.txt +0 -96
  22. package/vendor/librocksdb/LICENSE +0 -201
  23. package/vendor/librocksdb/NOTICE +0 -13
  24. package/vendor/librocksdb/README.md +0 -11
  25. package/vendor/librocksdb/include/rocksdb.h +0 -294
  26. package/vendor/librocksdb/src/rocksdb.cc +0 -714
  27. package/vendor/librocksdb/vendor/rocksdb/CMakeLists.txt +0 -1642
  28. package/vendor/librocksdb/vendor/rocksdb/cache/cache.cc +0 -193
  29. package/vendor/librocksdb/vendor/rocksdb/cache/cache_bench.cc +0 -20
  30. package/vendor/librocksdb/vendor/rocksdb/cache/cache_bench_tool.cc +0 -1177
  31. package/vendor/librocksdb/vendor/rocksdb/cache/cache_entry_roles.cc +0 -104
  32. package/vendor/librocksdb/vendor/rocksdb/cache/cache_entry_roles.h +0 -20
  33. package/vendor/librocksdb/vendor/rocksdb/cache/cache_entry_stats.h +0 -182
  34. package/vendor/librocksdb/vendor/rocksdb/cache/cache_helpers.cc +0 -41
  35. package/vendor/librocksdb/vendor/rocksdb/cache/cache_helpers.h +0 -139
  36. package/vendor/librocksdb/vendor/rocksdb/cache/cache_key.cc +0 -364
  37. package/vendor/librocksdb/vendor/rocksdb/cache/cache_key.h +0 -143
  38. package/vendor/librocksdb/vendor/rocksdb/cache/cache_reservation_manager.cc +0 -184
  39. package/vendor/librocksdb/vendor/rocksdb/cache/cache_reservation_manager.h +0 -318
  40. package/vendor/librocksdb/vendor/rocksdb/cache/charged_cache.cc +0 -111
  41. package/vendor/librocksdb/vendor/rocksdb/cache/charged_cache.h +0 -61
  42. package/vendor/librocksdb/vendor/rocksdb/cache/clock_cache.cc +0 -3657
  43. package/vendor/librocksdb/vendor/rocksdb/cache/clock_cache.h +0 -1165
  44. package/vendor/librocksdb/vendor/rocksdb/cache/compressed_secondary_cache.cc +0 -414
  45. package/vendor/librocksdb/vendor/rocksdb/cache/compressed_secondary_cache.h +0 -151
  46. package/vendor/librocksdb/vendor/rocksdb/cache/lru_cache.cc +0 -726
  47. package/vendor/librocksdb/vendor/rocksdb/cache/lru_cache.h +0 -467
  48. package/vendor/librocksdb/vendor/rocksdb/cache/secondary_cache.cc +0 -12
  49. package/vendor/librocksdb/vendor/rocksdb/cache/secondary_cache_adapter.cc +0 -743
  50. package/vendor/librocksdb/vendor/rocksdb/cache/secondary_cache_adapter.h +0 -103
  51. package/vendor/librocksdb/vendor/rocksdb/cache/sharded_cache.cc +0 -147
  52. package/vendor/librocksdb/vendor/rocksdb/cache/sharded_cache.h +0 -322
  53. package/vendor/librocksdb/vendor/rocksdb/cache/tiered_secondary_cache.cc +0 -125
  54. package/vendor/librocksdb/vendor/rocksdb/cache/tiered_secondary_cache.h +0 -158
  55. package/vendor/librocksdb/vendor/rocksdb/cache/typed_cache.h +0 -380
  56. package/vendor/librocksdb/vendor/rocksdb/cmake/RocksDBConfig.cmake.in +0 -54
  57. package/vendor/librocksdb/vendor/rocksdb/db/arena_wrapped_db_iter.cc +0 -182
  58. package/vendor/librocksdb/vendor/rocksdb/db/arena_wrapped_db_iter.h +0 -128
  59. package/vendor/librocksdb/vendor/rocksdb/db/attribute_group_iterator_impl.cc +0 -20
  60. package/vendor/librocksdb/vendor/rocksdb/db/attribute_group_iterator_impl.h +0 -83
  61. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_constants.h +0 -16
  62. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_contents.cc +0 -42
  63. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_contents.h +0 -60
  64. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_counting_iterator.h +0 -150
  65. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_fetcher.cc +0 -34
  66. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_fetcher.h +0 -37
  67. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_addition.cc +0 -156
  68. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_addition.h +0 -67
  69. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_builder.cc +0 -429
  70. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_builder.h +0 -113
  71. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_cache.cc +0 -101
  72. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_cache.h +0 -56
  73. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_completion_callback.h +0 -84
  74. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_garbage.cc +0 -134
  75. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_garbage.h +0 -57
  76. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_meta.cc +0 -62
  77. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_meta.h +0 -170
  78. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_reader.cc +0 -622
  79. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_reader.h +0 -111
  80. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_garbage_meter.cc +0 -100
  81. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_garbage_meter.h +0 -102
  82. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_index.h +0 -187
  83. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_format.cc +0 -143
  84. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_format.h +0 -164
  85. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_sequential_reader.cc +0 -133
  86. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_sequential_reader.h +0 -83
  87. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_writer.cc +0 -207
  88. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_writer.h +0 -87
  89. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_read_request.h +0 -58
  90. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_source.cc +0 -459
  91. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_source.h +0 -161
  92. package/vendor/librocksdb/vendor/rocksdb/db/blob/prefetch_buffer_collection.cc +0 -23
  93. package/vendor/librocksdb/vendor/rocksdb/db/blob/prefetch_buffer_collection.h +0 -38
  94. package/vendor/librocksdb/vendor/rocksdb/db/builder.cc +0 -517
  95. package/vendor/librocksdb/vendor/rocksdb/db/builder.h +0 -76
  96. package/vendor/librocksdb/vendor/rocksdb/db/c.cc +0 -7133
  97. package/vendor/librocksdb/vendor/rocksdb/db/c_test.c +0 -4052
  98. package/vendor/librocksdb/vendor/rocksdb/db/coalescing_iterator.cc +0 -47
  99. package/vendor/librocksdb/vendor/rocksdb/db/coalescing_iterator.h +0 -79
  100. package/vendor/librocksdb/vendor/rocksdb/db/column_family.cc +0 -1859
  101. package/vendor/librocksdb/vendor/rocksdb/db/column_family.h +0 -918
  102. package/vendor/librocksdb/vendor/rocksdb/db/compaction/clipping_iterator.h +0 -281
  103. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction.cc +0 -995
  104. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction.h +0 -602
  105. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_iteration_stats.h +0 -56
  106. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_iterator.cc +0 -1523
  107. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_iterator.h +0 -557
  108. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_job.cc +0 -2155
  109. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_job.h +0 -520
  110. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_outputs.cc +0 -802
  111. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_outputs.h +0 -411
  112. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker.cc +0 -1245
  113. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker.h +0 -322
  114. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_fifo.cc +0 -478
  115. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_fifo.h +0 -61
  116. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_level.cc +0 -977
  117. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_level.h +0 -32
  118. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_universal.cc +0 -1578
  119. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_universal.h +0 -29
  120. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_service_job.cc +0 -835
  121. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_state.cc +0 -46
  122. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_state.h +0 -42
  123. package/vendor/librocksdb/vendor/rocksdb/db/compaction/file_pri.h +0 -94
  124. package/vendor/librocksdb/vendor/rocksdb/db/compaction/sst_partitioner.cc +0 -83
  125. package/vendor/librocksdb/vendor/rocksdb/db/compaction/subcompaction_state.cc +0 -106
  126. package/vendor/librocksdb/vendor/rocksdb/db/compaction/subcompaction_state.h +0 -220
  127. package/vendor/librocksdb/vendor/rocksdb/db/convenience.cc +0 -101
  128. package/vendor/librocksdb/vendor/rocksdb/db/convenience_impl.h +0 -15
  129. package/vendor/librocksdb/vendor/rocksdb/db/db_filesnapshot.cc +0 -506
  130. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/compacted_db_impl.cc +0 -275
  131. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/compacted_db_impl.h +0 -147
  132. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl.cc +0 -6767
  133. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl.h +0 -3056
  134. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_compaction_flush.cc +0 -4390
  135. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_debug.cc +0 -327
  136. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_experimental.cc +0 -164
  137. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_files.cc +0 -1032
  138. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_follower.cc +0 -348
  139. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_follower.h +0 -54
  140. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_open.cc +0 -2325
  141. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_readonly.cc +0 -376
  142. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_readonly.h +0 -179
  143. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_secondary.cc +0 -1025
  144. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_secondary.h +0 -322
  145. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_write.cc +0 -2624
  146. package/vendor/librocksdb/vendor/rocksdb/db/db_info_dumper.cc +0 -165
  147. package/vendor/librocksdb/vendor/rocksdb/db/db_info_dumper.h +0 -15
  148. package/vendor/librocksdb/vendor/rocksdb/db/db_iter.cc +0 -1774
  149. package/vendor/librocksdb/vendor/rocksdb/db/db_iter.h +0 -444
  150. package/vendor/librocksdb/vendor/rocksdb/db/db_test2.cc +0 -7839
  151. package/vendor/librocksdb/vendor/rocksdb/db/db_test_util.cc +0 -1800
  152. package/vendor/librocksdb/vendor/rocksdb/db/db_test_util.h +0 -1427
  153. package/vendor/librocksdb/vendor/rocksdb/db/db_with_timestamp_test_util.cc +0 -96
  154. package/vendor/librocksdb/vendor/rocksdb/db/db_with_timestamp_test_util.h +0 -126
  155. package/vendor/librocksdb/vendor/rocksdb/db/dbformat.cc +0 -282
  156. package/vendor/librocksdb/vendor/rocksdb/db/dbformat.h +0 -1101
  157. package/vendor/librocksdb/vendor/rocksdb/db/error_handler.cc +0 -806
  158. package/vendor/librocksdb/vendor/rocksdb/db/error_handler.h +0 -149
  159. package/vendor/librocksdb/vendor/rocksdb/db/event_helpers.cc +0 -332
  160. package/vendor/librocksdb/vendor/rocksdb/db/event_helpers.h +0 -78
  161. package/vendor/librocksdb/vendor/rocksdb/db/experimental.cc +0 -1212
  162. package/vendor/librocksdb/vendor/rocksdb/db/external_sst_file_ingestion_job.cc +0 -1249
  163. package/vendor/librocksdb/vendor/rocksdb/db/external_sst_file_ingestion_job.h +0 -268
  164. package/vendor/librocksdb/vendor/rocksdb/db/file_indexer.cc +0 -216
  165. package/vendor/librocksdb/vendor/rocksdb/db/file_indexer.h +0 -140
  166. package/vendor/librocksdb/vendor/rocksdb/db/flush_job.cc +0 -1217
  167. package/vendor/librocksdb/vendor/rocksdb/db/flush_job.h +0 -240
  168. package/vendor/librocksdb/vendor/rocksdb/db/flush_scheduler.cc +0 -86
  169. package/vendor/librocksdb/vendor/rocksdb/db/flush_scheduler.h +0 -55
  170. package/vendor/librocksdb/vendor/rocksdb/db/forward_iterator.cc +0 -1082
  171. package/vendor/librocksdb/vendor/rocksdb/db/forward_iterator.h +0 -166
  172. package/vendor/librocksdb/vendor/rocksdb/db/forward_iterator_bench.cc +0 -378
  173. package/vendor/librocksdb/vendor/rocksdb/db/history_trimming_iterator.h +0 -95
  174. package/vendor/librocksdb/vendor/rocksdb/db/import_column_family_job.cc +0 -463
  175. package/vendor/librocksdb/vendor/rocksdb/db/import_column_family_job.h +0 -91
  176. package/vendor/librocksdb/vendor/rocksdb/db/internal_stats.cc +0 -2198
  177. package/vendor/librocksdb/vendor/rocksdb/db/internal_stats.h +0 -896
  178. package/vendor/librocksdb/vendor/rocksdb/db/job_context.h +0 -254
  179. package/vendor/librocksdb/vendor/rocksdb/db/kv_checksum.h +0 -484
  180. package/vendor/librocksdb/vendor/rocksdb/db/log_format.h +0 -55
  181. package/vendor/librocksdb/vendor/rocksdb/db/log_reader.cc +0 -958
  182. package/vendor/librocksdb/vendor/rocksdb/db/log_reader.h +0 -245
  183. package/vendor/librocksdb/vendor/rocksdb/db/log_writer.cc +0 -355
  184. package/vendor/librocksdb/vendor/rocksdb/db/log_writer.h +0 -151
  185. package/vendor/librocksdb/vendor/rocksdb/db/logs_with_prep_tracker.cc +0 -67
  186. package/vendor/librocksdb/vendor/rocksdb/db/logs_with_prep_tracker.h +0 -62
  187. package/vendor/librocksdb/vendor/rocksdb/db/lookup_key.h +0 -68
  188. package/vendor/librocksdb/vendor/rocksdb/db/malloc_stats.cc +0 -52
  189. package/vendor/librocksdb/vendor/rocksdb/db/malloc_stats.h +0 -22
  190. package/vendor/librocksdb/vendor/rocksdb/db/memtable.cc +0 -1684
  191. package/vendor/librocksdb/vendor/rocksdb/db/memtable.h +0 -712
  192. package/vendor/librocksdb/vendor/rocksdb/db/memtable_list.cc +0 -1028
  193. package/vendor/librocksdb/vendor/rocksdb/db/memtable_list.h +0 -514
  194. package/vendor/librocksdb/vendor/rocksdb/db/merge_context.h +0 -150
  195. package/vendor/librocksdb/vendor/rocksdb/db/merge_helper.cc +0 -699
  196. package/vendor/librocksdb/vendor/rocksdb/db/merge_helper.h +0 -318
  197. package/vendor/librocksdb/vendor/rocksdb/db/merge_operator.cc +0 -167
  198. package/vendor/librocksdb/vendor/rocksdb/db/multi_cf_iterator_impl.h +0 -296
  199. package/vendor/librocksdb/vendor/rocksdb/db/output_validator.cc +0 -29
  200. package/vendor/librocksdb/vendor/rocksdb/db/output_validator.h +0 -45
  201. package/vendor/librocksdb/vendor/rocksdb/db/periodic_task_scheduler.cc +0 -110
  202. package/vendor/librocksdb/vendor/rocksdb/db/periodic_task_scheduler.h +0 -108
  203. package/vendor/librocksdb/vendor/rocksdb/db/pinned_iterators_manager.h +0 -92
  204. package/vendor/librocksdb/vendor/rocksdb/db/post_memtable_callback.h +0 -25
  205. package/vendor/librocksdb/vendor/rocksdb/db/pre_release_callback.h +0 -37
  206. package/vendor/librocksdb/vendor/rocksdb/db/range_del_aggregator.cc +0 -553
  207. package/vendor/librocksdb/vendor/rocksdb/db/range_del_aggregator.h +0 -481
  208. package/vendor/librocksdb/vendor/rocksdb/db/range_del_aggregator_bench.cc +0 -280
  209. package/vendor/librocksdb/vendor/rocksdb/db/range_tombstone_fragmenter.cc +0 -515
  210. package/vendor/librocksdb/vendor/rocksdb/db/range_tombstone_fragmenter.h +0 -361
  211. package/vendor/librocksdb/vendor/rocksdb/db/read_callback.h +0 -54
  212. package/vendor/librocksdb/vendor/rocksdb/db/repair.cc +0 -864
  213. package/vendor/librocksdb/vendor/rocksdb/db/seqno_to_time_mapping.cc +0 -573
  214. package/vendor/librocksdb/vendor/rocksdb/db/seqno_to_time_mapping.h +0 -307
  215. package/vendor/librocksdb/vendor/rocksdb/db/snapshot_checker.h +0 -58
  216. package/vendor/librocksdb/vendor/rocksdb/db/snapshot_impl.cc +0 -25
  217. package/vendor/librocksdb/vendor/rocksdb/db/snapshot_impl.h +0 -239
  218. package/vendor/librocksdb/vendor/rocksdb/db/table_cache.cc +0 -745
  219. package/vendor/librocksdb/vendor/rocksdb/db/table_cache.h +0 -298
  220. package/vendor/librocksdb/vendor/rocksdb/db/table_cache_sync_and_async.h +0 -135
  221. package/vendor/librocksdb/vendor/rocksdb/db/table_properties_collector.cc +0 -74
  222. package/vendor/librocksdb/vendor/rocksdb/db/table_properties_collector.h +0 -185
  223. package/vendor/librocksdb/vendor/rocksdb/db/transaction_log_impl.cc +0 -296
  224. package/vendor/librocksdb/vendor/rocksdb/db/transaction_log_impl.h +0 -128
  225. package/vendor/librocksdb/vendor/rocksdb/db/trim_history_scheduler.cc +0 -54
  226. package/vendor/librocksdb/vendor/rocksdb/db/trim_history_scheduler.h +0 -46
  227. package/vendor/librocksdb/vendor/rocksdb/db/version_builder.cc +0 -1431
  228. package/vendor/librocksdb/vendor/rocksdb/db/version_builder.h +0 -93
  229. package/vendor/librocksdb/vendor/rocksdb/db/version_edit.cc +0 -1119
  230. package/vendor/librocksdb/vendor/rocksdb/db/version_edit.h +0 -769
  231. package/vendor/librocksdb/vendor/rocksdb/db/version_edit_handler.cc +0 -1264
  232. package/vendor/librocksdb/vendor/rocksdb/db/version_edit_handler.h +0 -390
  233. package/vendor/librocksdb/vendor/rocksdb/db/version_set.cc +0 -7562
  234. package/vendor/librocksdb/vendor/rocksdb/db/version_set.h +0 -1799
  235. package/vendor/librocksdb/vendor/rocksdb/db/version_set_sync_and_async.h +0 -169
  236. package/vendor/librocksdb/vendor/rocksdb/db/version_util.h +0 -77
  237. package/vendor/librocksdb/vendor/rocksdb/db/wal_edit.cc +0 -211
  238. package/vendor/librocksdb/vendor/rocksdb/db/wal_edit.h +0 -177
  239. package/vendor/librocksdb/vendor/rocksdb/db/wal_manager.cc +0 -539
  240. package/vendor/librocksdb/vendor/rocksdb/db/wal_manager.h +0 -138
  241. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_column_serialization.cc +0 -166
  242. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_column_serialization.h +0 -57
  243. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_columns.cc +0 -22
  244. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_columns_helper.cc +0 -52
  245. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_columns_helper.h +0 -40
  246. package/vendor/librocksdb/vendor/rocksdb/db/write_batch.cc +0 -3394
  247. package/vendor/librocksdb/vendor/rocksdb/db/write_batch_base.cc +0 -94
  248. package/vendor/librocksdb/vendor/rocksdb/db/write_batch_internal.h +0 -408
  249. package/vendor/librocksdb/vendor/rocksdb/db/write_callback.h +0 -27
  250. package/vendor/librocksdb/vendor/rocksdb/db/write_controller.cc +0 -121
  251. package/vendor/librocksdb/vendor/rocksdb/db/write_controller.h +0 -148
  252. package/vendor/librocksdb/vendor/rocksdb/db/write_stall_stats.cc +0 -179
  253. package/vendor/librocksdb/vendor/rocksdb/db/write_stall_stats.h +0 -47
  254. package/vendor/librocksdb/vendor/rocksdb/db/write_thread.cc +0 -931
  255. package/vendor/librocksdb/vendor/rocksdb/db/write_thread.h +0 -498
  256. package/vendor/librocksdb/vendor/rocksdb/env/composite_env.cc +0 -534
  257. package/vendor/librocksdb/vendor/rocksdb/env/composite_env_wrapper.h +0 -399
  258. package/vendor/librocksdb/vendor/rocksdb/env/emulated_clock.h +0 -114
  259. package/vendor/librocksdb/vendor/rocksdb/env/env.cc +0 -1253
  260. package/vendor/librocksdb/vendor/rocksdb/env/env_chroot.cc +0 -149
  261. package/vendor/librocksdb/vendor/rocksdb/env/env_chroot.h +0 -55
  262. package/vendor/librocksdb/vendor/rocksdb/env/env_encryption.cc +0 -1192
  263. package/vendor/librocksdb/vendor/rocksdb/env/env_encryption_ctr.h +0 -97
  264. package/vendor/librocksdb/vendor/rocksdb/env/env_posix.cc +0 -530
  265. package/vendor/librocksdb/vendor/rocksdb/env/file_system.cc +0 -278
  266. package/vendor/librocksdb/vendor/rocksdb/env/file_system_tracer.cc +0 -564
  267. package/vendor/librocksdb/vendor/rocksdb/env/file_system_tracer.h +0 -461
  268. package/vendor/librocksdb/vendor/rocksdb/env/fs_on_demand.cc +0 -331
  269. package/vendor/librocksdb/vendor/rocksdb/env/fs_on_demand.h +0 -139
  270. package/vendor/librocksdb/vendor/rocksdb/env/fs_posix.cc +0 -1285
  271. package/vendor/librocksdb/vendor/rocksdb/env/fs_readonly.h +0 -105
  272. package/vendor/librocksdb/vendor/rocksdb/env/fs_remap.cc +0 -341
  273. package/vendor/librocksdb/vendor/rocksdb/env/fs_remap.h +0 -137
  274. package/vendor/librocksdb/vendor/rocksdb/env/io_posix.cc +0 -1738
  275. package/vendor/librocksdb/vendor/rocksdb/env/io_posix.h +0 -517
  276. package/vendor/librocksdb/vendor/rocksdb/env/mock_env.cc +0 -1058
  277. package/vendor/librocksdb/vendor/rocksdb/env/mock_env.h +0 -144
  278. package/vendor/librocksdb/vendor/rocksdb/env/unique_id_gen.cc +0 -243
  279. package/vendor/librocksdb/vendor/rocksdb/env/unique_id_gen.h +0 -119
  280. package/vendor/librocksdb/vendor/rocksdb/file/delete_scheduler.cc +0 -513
  281. package/vendor/librocksdb/vendor/rocksdb/file/delete_scheduler.h +0 -200
  282. package/vendor/librocksdb/vendor/rocksdb/file/file_prefetch_buffer.cc +0 -992
  283. package/vendor/librocksdb/vendor/rocksdb/file/file_prefetch_buffer.h +0 -629
  284. package/vendor/librocksdb/vendor/rocksdb/file/file_util.cc +0 -308
  285. package/vendor/librocksdb/vendor/rocksdb/file/file_util.h +0 -123
  286. package/vendor/librocksdb/vendor/rocksdb/file/filename.cc +0 -538
  287. package/vendor/librocksdb/vendor/rocksdb/file/filename.h +0 -186
  288. package/vendor/librocksdb/vendor/rocksdb/file/line_file_reader.cc +0 -73
  289. package/vendor/librocksdb/vendor/rocksdb/file/line_file_reader.h +0 -60
  290. package/vendor/librocksdb/vendor/rocksdb/file/random_access_file_reader.cc +0 -639
  291. package/vendor/librocksdb/vendor/rocksdb/file/random_access_file_reader.h +0 -197
  292. package/vendor/librocksdb/vendor/rocksdb/file/read_write_util.cc +0 -33
  293. package/vendor/librocksdb/vendor/rocksdb/file/read_write_util.h +0 -31
  294. package/vendor/librocksdb/vendor/rocksdb/file/readahead_file_info.h +0 -33
  295. package/vendor/librocksdb/vendor/rocksdb/file/readahead_raf.cc +0 -169
  296. package/vendor/librocksdb/vendor/rocksdb/file/readahead_raf.h +0 -29
  297. package/vendor/librocksdb/vendor/rocksdb/file/sequence_file_reader.cc +0 -324
  298. package/vendor/librocksdb/vendor/rocksdb/file/sequence_file_reader.h +0 -127
  299. package/vendor/librocksdb/vendor/rocksdb/file/sst_file_manager_impl.cc +0 -525
  300. package/vendor/librocksdb/vendor/rocksdb/file/sst_file_manager_impl.h +0 -220
  301. package/vendor/librocksdb/vendor/rocksdb/file/writable_file_writer.cc +0 -1007
  302. package/vendor/librocksdb/vendor/rocksdb/file/writable_file_writer.h +0 -370
  303. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/advanced_cache.h +0 -665
  304. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/advanced_options.h +0 -1101
  305. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/attribute_groups.h +0 -114
  306. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/block_cache_trace_writer.h +0 -149
  307. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/c.h +0 -3122
  308. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/cache.h +0 -579
  309. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/cache_bench_tool.h +0 -14
  310. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/cleanable.h +0 -128
  311. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/compaction_filter.h +0 -374
  312. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/compaction_job_stats.h +0 -112
  313. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/comparator.h +0 -231
  314. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/compression_type.h +0 -186
  315. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/concurrent_task_limiter.h +0 -51
  316. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/configurable.h +0 -390
  317. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/convenience.h +0 -466
  318. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/customizable.h +0 -229
  319. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/data_structure.h +0 -186
  320. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db.h +0 -2174
  321. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db_bench_tool.h +0 -11
  322. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db_dump_tool.h +0 -43
  323. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db_stress_tool.h +0 -11
  324. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/env.h +0 -1920
  325. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/env_encryption.h +0 -363
  326. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/experimental.h +0 -492
  327. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/file_checksum.h +0 -146
  328. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/file_system.h +0 -1961
  329. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/filter_policy.h +0 -211
  330. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/flush_block_policy.h +0 -75
  331. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/functor_wrapper.h +0 -56
  332. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/io_status.h +0 -244
  333. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/iostats_context.h +0 -98
  334. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/iterator.h +0 -104
  335. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/iterator_base.h +0 -90
  336. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/ldb_tool.h +0 -42
  337. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/listener.h +0 -869
  338. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/memory_allocator.h +0 -87
  339. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/memtablerep.h +0 -421
  340. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/merge_operator.h +0 -337
  341. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/metadata.h +0 -258
  342. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/options.h +0 -2339
  343. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/perf_context.h +0 -319
  344. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/perf_level.h +0 -39
  345. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/persistent_cache.h +0 -74
  346. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/port_defs.h +0 -26
  347. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/rate_limiter.h +0 -172
  348. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/rocksdb_namespace.h +0 -16
  349. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/secondary_cache.h +0 -220
  350. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/slice.h +0 -264
  351. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/slice_transform.h +0 -135
  352. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/snapshot.h +0 -53
  353. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_dump_tool.h +0 -17
  354. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_file_manager.h +0 -139
  355. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_file_reader.h +0 -61
  356. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_file_writer.h +0 -203
  357. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_partitioner.h +0 -142
  358. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/statistics.h +0 -794
  359. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/stats_history.h +0 -70
  360. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/status.h +0 -609
  361. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/system_clock.h +0 -129
  362. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/table.h +0 -938
  363. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/table_properties.h +0 -380
  364. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/table_reader_caller.h +0 -41
  365. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/thread_status.h +0 -197
  366. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/threadpool.h +0 -67
  367. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/trace_reader_writer.h +0 -52
  368. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/trace_record.h +0 -248
  369. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/trace_record_result.h +0 -187
  370. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/transaction_log.h +0 -128
  371. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/types.h +0 -113
  372. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/unique_id.h +0 -55
  373. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/universal_compaction.h +0 -127
  374. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/user_write_callback.h +0 -29
  375. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/agg_merge.h +0 -138
  376. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/backup_engine.h +0 -689
  377. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/cache_dump_load.h +0 -144
  378. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/checkpoint.h +0 -65
  379. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/convenience.h +0 -10
  380. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/customizable_util.h +0 -321
  381. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/db_ttl.h +0 -70
  382. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/debug.h +0 -46
  383. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/env_mirror.h +0 -179
  384. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/info_log_finder.h +0 -19
  385. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/ldb_cmd.h +0 -338
  386. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h +0 -75
  387. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/leveldb_options.h +0 -145
  388. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/lua/rocks_lua_custom_library.h +0 -43
  389. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/lua/rocks_lua_util.h +0 -55
  390. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/memory_util.h +0 -48
  391. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/object_registry.h +0 -583
  392. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/optimistic_transaction_db.h +0 -129
  393. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/option_change_migration.h +0 -24
  394. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/options_type.h +0 -1222
  395. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/options_util.h +0 -105
  396. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/replayer.h +0 -85
  397. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/sim_cache.h +0 -92
  398. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/stackable_db.h +0 -593
  399. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/table_properties_collectors.h +0 -133
  400. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/transaction.h +0 -765
  401. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/transaction_db.h +0 -510
  402. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/transaction_db_mutex.h +0 -89
  403. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/types_util.h +0 -36
  404. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/write_batch_with_index.h +0 -402
  405. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/version.h +0 -43
  406. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/wal_filter.h +0 -111
  407. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/wide_columns.h +0 -303
  408. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/write_batch.h +0 -518
  409. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/write_batch_base.h +0 -165
  410. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/write_buffer_manager.h +0 -183
  411. package/vendor/librocksdb/vendor/rocksdb/logging/auto_roll_logger.cc +0 -366
  412. package/vendor/librocksdb/vendor/rocksdb/logging/auto_roll_logger.h +0 -165
  413. package/vendor/librocksdb/vendor/rocksdb/logging/env_logger.h +0 -195
  414. package/vendor/librocksdb/vendor/rocksdb/logging/event_logger.cc +0 -68
  415. package/vendor/librocksdb/vendor/rocksdb/logging/event_logger.h +0 -202
  416. package/vendor/librocksdb/vendor/rocksdb/logging/log_buffer.cc +0 -91
  417. package/vendor/librocksdb/vendor/rocksdb/logging/log_buffer.h +0 -57
  418. package/vendor/librocksdb/vendor/rocksdb/logging/logging.h +0 -62
  419. package/vendor/librocksdb/vendor/rocksdb/memory/allocator.h +0 -58
  420. package/vendor/librocksdb/vendor/rocksdb/memory/arena.cc +0 -170
  421. package/vendor/librocksdb/vendor/rocksdb/memory/arena.h +0 -146
  422. package/vendor/librocksdb/vendor/rocksdb/memory/concurrent_arena.cc +0 -45
  423. package/vendor/librocksdb/vendor/rocksdb/memory/concurrent_arena.h +0 -215
  424. package/vendor/librocksdb/vendor/rocksdb/memory/jemalloc_nodump_allocator.cc +0 -304
  425. package/vendor/librocksdb/vendor/rocksdb/memory/jemalloc_nodump_allocator.h +0 -99
  426. package/vendor/librocksdb/vendor/rocksdb/memory/memkind_kmem_allocator.cc +0 -44
  427. package/vendor/librocksdb/vendor/rocksdb/memory/memkind_kmem_allocator.h +0 -43
  428. package/vendor/librocksdb/vendor/rocksdb/memory/memory_allocator.cc +0 -81
  429. package/vendor/librocksdb/vendor/rocksdb/memory/memory_allocator_impl.h +0 -47
  430. package/vendor/librocksdb/vendor/rocksdb/memory/memory_usage.h +0 -38
  431. package/vendor/librocksdb/vendor/rocksdb/memtable/alloc_tracker.cc +0 -63
  432. package/vendor/librocksdb/vendor/rocksdb/memtable/hash_linklist_rep.cc +0 -925
  433. package/vendor/librocksdb/vendor/rocksdb/memtable/hash_skiplist_rep.cc +0 -392
  434. package/vendor/librocksdb/vendor/rocksdb/memtable/inlineskiplist.h +0 -1051
  435. package/vendor/librocksdb/vendor/rocksdb/memtable/memtablerep_bench.cc +0 -687
  436. package/vendor/librocksdb/vendor/rocksdb/memtable/skiplist.h +0 -498
  437. package/vendor/librocksdb/vendor/rocksdb/memtable/skiplistrep.cc +0 -368
  438. package/vendor/librocksdb/vendor/rocksdb/memtable/stl_wrappers.h +0 -33
  439. package/vendor/librocksdb/vendor/rocksdb/memtable/vectorrep.cc +0 -307
  440. package/vendor/librocksdb/vendor/rocksdb/memtable/write_buffer_manager.cc +0 -185
  441. package/vendor/librocksdb/vendor/rocksdb/monitoring/file_read_sample.h +0 -23
  442. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram.cc +0 -280
  443. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram.h +0 -143
  444. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram_windowing.cc +0 -198
  445. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram_windowing.h +0 -84
  446. package/vendor/librocksdb/vendor/rocksdb/monitoring/in_memory_stats_history.cc +0 -50
  447. package/vendor/librocksdb/vendor/rocksdb/monitoring/in_memory_stats_history.h +0 -74
  448. package/vendor/librocksdb/vendor/rocksdb/monitoring/instrumented_mutex.cc +0 -90
  449. package/vendor/librocksdb/vendor/rocksdb/monitoring/instrumented_mutex.h +0 -126
  450. package/vendor/librocksdb/vendor/rocksdb/monitoring/iostats_context.cc +0 -78
  451. package/vendor/librocksdb/vendor/rocksdb/monitoring/iostats_context_imp.h +0 -62
  452. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_context.cc +0 -317
  453. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_context_imp.h +0 -103
  454. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_level.cc +0 -23
  455. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_level_imp.h +0 -14
  456. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_step_timer.h +0 -77
  457. package/vendor/librocksdb/vendor/rocksdb/monitoring/persistent_stats_history.cc +0 -173
  458. package/vendor/librocksdb/vendor/rocksdb/monitoring/persistent_stats_history.h +0 -83
  459. package/vendor/librocksdb/vendor/rocksdb/monitoring/statistics.cc +0 -561
  460. package/vendor/librocksdb/vendor/rocksdb/monitoring/statistics_impl.h +0 -143
  461. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_impl.cc +0 -163
  462. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_updater.cc +0 -328
  463. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_updater.h +0 -226
  464. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_updater_debug.cc +0 -43
  465. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_util.cc +0 -214
  466. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_util.h +0 -139
  467. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_util_debug.cc +0 -60
  468. package/vendor/librocksdb/vendor/rocksdb/options/cf_options.cc +0 -1218
  469. package/vendor/librocksdb/vendor/rocksdb/options/cf_options.h +0 -352
  470. package/vendor/librocksdb/vendor/rocksdb/options/configurable.cc +0 -720
  471. package/vendor/librocksdb/vendor/rocksdb/options/configurable_helper.h +0 -185
  472. package/vendor/librocksdb/vendor/rocksdb/options/configurable_test.h +0 -116
  473. package/vendor/librocksdb/vendor/rocksdb/options/customizable.cc +0 -133
  474. package/vendor/librocksdb/vendor/rocksdb/options/db_options.cc +0 -1113
  475. package/vendor/librocksdb/vendor/rocksdb/options/db_options.h +0 -160
  476. package/vendor/librocksdb/vendor/rocksdb/options/offpeak_time_info.cc +0 -59
  477. package/vendor/librocksdb/vendor/rocksdb/options/offpeak_time_info.h +0 -37
  478. package/vendor/librocksdb/vendor/rocksdb/options/options.cc +0 -717
  479. package/vendor/librocksdb/vendor/rocksdb/options/options_helper.cc +0 -1438
  480. package/vendor/librocksdb/vendor/rocksdb/options/options_helper.h +0 -115
  481. package/vendor/librocksdb/vendor/rocksdb/options/options_parser.cc +0 -745
  482. package/vendor/librocksdb/vendor/rocksdb/options/options_parser.h +0 -151
  483. package/vendor/librocksdb/vendor/rocksdb/port/jemalloc_helper.h +0 -107
  484. package/vendor/librocksdb/vendor/rocksdb/port/lang.h +0 -97
  485. package/vendor/librocksdb/vendor/rocksdb/port/likely.h +0 -18
  486. package/vendor/librocksdb/vendor/rocksdb/port/malloc.h +0 -17
  487. package/vendor/librocksdb/vendor/rocksdb/port/mmap.cc +0 -98
  488. package/vendor/librocksdb/vendor/rocksdb/port/mmap.h +0 -90
  489. package/vendor/librocksdb/vendor/rocksdb/port/port.h +0 -21
  490. package/vendor/librocksdb/vendor/rocksdb/port/port_dirent.h +0 -44
  491. package/vendor/librocksdb/vendor/rocksdb/port/port_example.h +0 -101
  492. package/vendor/librocksdb/vendor/rocksdb/port/port_posix.cc +0 -300
  493. package/vendor/librocksdb/vendor/rocksdb/port/port_posix.h +0 -246
  494. package/vendor/librocksdb/vendor/rocksdb/port/stack_trace.cc +0 -418
  495. package/vendor/librocksdb/vendor/rocksdb/port/stack_trace.h +0 -31
  496. package/vendor/librocksdb/vendor/rocksdb/port/sys_time.h +0 -63
  497. package/vendor/librocksdb/vendor/rocksdb/port/util_logger.h +0 -18
  498. package/vendor/librocksdb/vendor/rocksdb/port/win/env_default.cc +0 -45
  499. package/vendor/librocksdb/vendor/rocksdb/port/win/env_win.cc +0 -1436
  500. package/vendor/librocksdb/vendor/rocksdb/port/win/env_win.h +0 -305
  501. package/vendor/librocksdb/vendor/rocksdb/port/win/io_win.cc +0 -1101
  502. package/vendor/librocksdb/vendor/rocksdb/port/win/io_win.h +0 -504
  503. package/vendor/librocksdb/vendor/rocksdb/port/win/port_win.cc +0 -305
  504. package/vendor/librocksdb/vendor/rocksdb/port/win/port_win.h +0 -382
  505. package/vendor/librocksdb/vendor/rocksdb/port/win/win_jemalloc.cc +0 -80
  506. package/vendor/librocksdb/vendor/rocksdb/port/win/win_logger.cc +0 -192
  507. package/vendor/librocksdb/vendor/rocksdb/port/win/win_logger.h +0 -64
  508. package/vendor/librocksdb/vendor/rocksdb/port/win/win_thread.cc +0 -170
  509. package/vendor/librocksdb/vendor/rocksdb/port/win/win_thread.h +0 -117
  510. package/vendor/librocksdb/vendor/rocksdb/port/win/xpress_win.cc +0 -210
  511. package/vendor/librocksdb/vendor/rocksdb/port/win/xpress_win.h +0 -26
  512. package/vendor/librocksdb/vendor/rocksdb/port/xpress.h +0 -17
  513. package/vendor/librocksdb/vendor/rocksdb/rocksdb.pc.in +0 -10
  514. package/vendor/librocksdb/vendor/rocksdb/table/adaptive/adaptive_table_factory.cc +0 -119
  515. package/vendor/librocksdb/vendor/rocksdb/table/adaptive/adaptive_table_factory.h +0 -56
  516. package/vendor/librocksdb/vendor/rocksdb/table/block_based/binary_search_index_reader.cc +0 -73
  517. package/vendor/librocksdb/vendor/rocksdb/table/block_based/binary_search_index_reader.h +0 -48
  518. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block.cc +0 -1341
  519. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block.h +0 -969
  520. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_builder.cc +0 -2148
  521. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_builder.h +0 -208
  522. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_factory.cc +0 -980
  523. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_factory.h +0 -102
  524. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_iterator.cc +0 -893
  525. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_iterator.h +0 -445
  526. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader.cc +0 -3296
  527. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader.h +0 -785
  528. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader_impl.h +0 -205
  529. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader_sync_and_async.h +0 -819
  530. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_builder.cc +0 -266
  531. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_builder.h +0 -128
  532. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_cache.cc +0 -108
  533. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_cache.h +0 -190
  534. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefetcher.cc +0 -158
  535. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefetcher.h +0 -74
  536. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefix_index.cc +0 -226
  537. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefix_index.h +0 -70
  538. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_type.h +0 -34
  539. package/vendor/librocksdb/vendor/rocksdb/table/block_based/cachable_entry.h +0 -249
  540. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_footer.cc +0 -59
  541. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_footer.h +0 -25
  542. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_hash_index.cc +0 -94
  543. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_hash_index.h +0 -137
  544. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_block.h +0 -189
  545. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_block_reader_common.cc +0 -169
  546. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_block_reader_common.h +0 -79
  547. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_policy.cc +0 -1989
  548. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_policy_internal.h +0 -341
  549. package/vendor/librocksdb/vendor/rocksdb/table/block_based/flush_block_policy.cc +0 -132
  550. package/vendor/librocksdb/vendor/rocksdb/table/block_based/flush_block_policy_impl.h +0 -40
  551. package/vendor/librocksdb/vendor/rocksdb/table/block_based/full_filter_block.cc +0 -297
  552. package/vendor/librocksdb/vendor/rocksdb/table/block_based/full_filter_block.h +0 -142
  553. package/vendor/librocksdb/vendor/rocksdb/table/block_based/hash_index_reader.cc +0 -146
  554. package/vendor/librocksdb/vendor/rocksdb/table/block_based/hash_index_reader.h +0 -49
  555. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_builder.cc +0 -305
  556. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_builder.h +0 -534
  557. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_reader_common.cc +0 -62
  558. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_reader_common.h +0 -94
  559. package/vendor/librocksdb/vendor/rocksdb/table/block_based/mock_block_based_table.h +0 -62
  560. package/vendor/librocksdb/vendor/rocksdb/table/block_based/parsed_full_filter_block.cc +0 -23
  561. package/vendor/librocksdb/vendor/rocksdb/table/block_based/parsed_full_filter_block.h +0 -47
  562. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_filter_block.cc +0 -610
  563. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_filter_block.h +0 -188
  564. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_iterator.cc +0 -164
  565. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_iterator.h +0 -160
  566. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_reader.cc +0 -264
  567. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_reader.h +0 -58
  568. package/vendor/librocksdb/vendor/rocksdb/table/block_based/reader_common.cc +0 -64
  569. package/vendor/librocksdb/vendor/rocksdb/table/block_based/reader_common.h +0 -36
  570. package/vendor/librocksdb/vendor/rocksdb/table/block_based/uncompression_dict_reader.cc +0 -118
  571. package/vendor/librocksdb/vendor/rocksdb/table/block_based/uncompression_dict_reader.h +0 -60
  572. package/vendor/librocksdb/vendor/rocksdb/table/block_fetcher.cc +0 -458
  573. package/vendor/librocksdb/vendor/rocksdb/table/block_fetcher.h +0 -168
  574. package/vendor/librocksdb/vendor/rocksdb/table/compaction_merging_iterator.cc +0 -370
  575. package/vendor/librocksdb/vendor/rocksdb/table/compaction_merging_iterator.h +0 -45
  576. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_builder.cc +0 -555
  577. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_builder.h +0 -136
  578. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_factory.cc +0 -100
  579. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_factory.h +0 -80
  580. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_reader.cc +0 -416
  581. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_reader.h +0 -100
  582. package/vendor/librocksdb/vendor/rocksdb/table/format.cc +0 -708
  583. package/vendor/librocksdb/vendor/rocksdb/table/format.h +0 -439
  584. package/vendor/librocksdb/vendor/rocksdb/table/get_context.cc +0 -622
  585. package/vendor/librocksdb/vendor/rocksdb/table/get_context.h +0 -259
  586. package/vendor/librocksdb/vendor/rocksdb/table/internal_iterator.h +0 -242
  587. package/vendor/librocksdb/vendor/rocksdb/table/iter_heap.h +0 -44
  588. package/vendor/librocksdb/vendor/rocksdb/table/iterator.cc +0 -134
  589. package/vendor/librocksdb/vendor/rocksdb/table/iterator_wrapper.h +0 -225
  590. package/vendor/librocksdb/vendor/rocksdb/table/merging_iterator.cc +0 -1755
  591. package/vendor/librocksdb/vendor/rocksdb/table/merging_iterator.h +0 -100
  592. package/vendor/librocksdb/vendor/rocksdb/table/meta_blocks.cc +0 -590
  593. package/vendor/librocksdb/vendor/rocksdb/table/meta_blocks.h +0 -181
  594. package/vendor/librocksdb/vendor/rocksdb/table/mock_table.cc +0 -355
  595. package/vendor/librocksdb/vendor/rocksdb/table/mock_table.h +0 -92
  596. package/vendor/librocksdb/vendor/rocksdb/table/multiget_context.h +0 -405
  597. package/vendor/librocksdb/vendor/rocksdb/table/persistent_cache_helper.cc +0 -110
  598. package/vendor/librocksdb/vendor/rocksdb/table/persistent_cache_helper.h +0 -46
  599. package/vendor/librocksdb/vendor/rocksdb/table/persistent_cache_options.h +0 -34
  600. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_bloom.cc +0 -78
  601. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_bloom.h +0 -132
  602. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_builder.cc +0 -348
  603. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_builder.h +0 -151
  604. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_factory.cc +0 -295
  605. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_factory.h +0 -180
  606. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_index.cc +0 -211
  607. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_index.h +0 -246
  608. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_key_coding.cc +0 -508
  609. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_key_coding.h +0 -199
  610. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_reader.cc +0 -778
  611. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_reader.h +0 -243
  612. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_dumper.cc +0 -601
  613. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_dumper.h +0 -104
  614. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_reader.cc +0 -166
  615. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_writer.cc +0 -536
  616. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_writer_collectors.h +0 -97
  617. package/vendor/librocksdb/vendor/rocksdb/table/table_builder.h +0 -239
  618. package/vendor/librocksdb/vendor/rocksdb/table/table_factory.cc +0 -52
  619. package/vendor/librocksdb/vendor/rocksdb/table/table_iterator.h +0 -69
  620. package/vendor/librocksdb/vendor/rocksdb/table/table_properties.cc +0 -357
  621. package/vendor/librocksdb/vendor/rocksdb/table/table_properties_internal.h +0 -14
  622. package/vendor/librocksdb/vendor/rocksdb/table/table_reader.h +0 -202
  623. package/vendor/librocksdb/vendor/rocksdb/table/table_reader_bench.cc +0 -341
  624. package/vendor/librocksdb/vendor/rocksdb/table/two_level_iterator.cc +0 -222
  625. package/vendor/librocksdb/vendor/rocksdb/table/two_level_iterator.h +0 -43
  626. package/vendor/librocksdb/vendor/rocksdb/table/unique_id.cc +0 -223
  627. package/vendor/librocksdb/vendor/rocksdb/table/unique_id_impl.h +0 -93
  628. package/vendor/librocksdb/vendor/rocksdb/test_util/mock_time_env.cc +0 -38
  629. package/vendor/librocksdb/vendor/rocksdb/test_util/mock_time_env.h +0 -109
  630. package/vendor/librocksdb/vendor/rocksdb/test_util/secondary_cache_test_util.cc +0 -93
  631. package/vendor/librocksdb/vendor/rocksdb/test_util/secondary_cache_test_util.h +0 -131
  632. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point.cc +0 -82
  633. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point.h +0 -182
  634. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point_impl.cc +0 -152
  635. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point_impl.h +0 -96
  636. package/vendor/librocksdb/vendor/rocksdb/test_util/testharness.cc +0 -105
  637. package/vendor/librocksdb/vendor/rocksdb/test_util/testharness.h +0 -124
  638. package/vendor/librocksdb/vendor/rocksdb/test_util/testutil.cc +0 -776
  639. package/vendor/librocksdb/vendor/rocksdb/test_util/testutil.h +0 -908
  640. package/vendor/librocksdb/vendor/rocksdb/test_util/transaction_test_util.cc +0 -400
  641. package/vendor/librocksdb/vendor/rocksdb/test_util/transaction_test_util.h +0 -147
  642. package/vendor/librocksdb/vendor/rocksdb/tools/CMakeLists.txt +0 -30
  643. package/vendor/librocksdb/vendor/rocksdb/tools/blob_dump.cc +0 -103
  644. package/vendor/librocksdb/vendor/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.cc +0 -2331
  645. package/vendor/librocksdb/vendor/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.h +0 -398
  646. package/vendor/librocksdb/vendor/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer_tool.cc +0 -17
  647. package/vendor/librocksdb/vendor/rocksdb/tools/db_bench.cc +0 -21
  648. package/vendor/librocksdb/vendor/rocksdb/tools/db_bench_tool.cc +0 -8743
  649. package/vendor/librocksdb/vendor/rocksdb/tools/db_repl_stress.cc +0 -132
  650. package/vendor/librocksdb/vendor/rocksdb/tools/dump/db_dump_tool.cc +0 -264
  651. package/vendor/librocksdb/vendor/rocksdb/tools/dump/rocksdb_dump.cc +0 -60
  652. package/vendor/librocksdb/vendor/rocksdb/tools/dump/rocksdb_undump.cc +0 -59
  653. package/vendor/librocksdb/vendor/rocksdb/tools/io_tracer_parser.cc +0 -17
  654. package/vendor/librocksdb/vendor/rocksdb/tools/io_tracer_parser_tool.cc +0 -142
  655. package/vendor/librocksdb/vendor/rocksdb/tools/io_tracer_parser_tool.h +0 -38
  656. package/vendor/librocksdb/vendor/rocksdb/tools/ldb.cc +0 -13
  657. package/vendor/librocksdb/vendor/rocksdb/tools/ldb_cmd.cc +0 -5044
  658. package/vendor/librocksdb/vendor/rocksdb/tools/ldb_cmd_impl.h +0 -814
  659. package/vendor/librocksdb/vendor/rocksdb/tools/ldb_tool.cc +0 -192
  660. package/vendor/librocksdb/vendor/rocksdb/tools/simulated_hybrid_file_system.cc +0 -244
  661. package/vendor/librocksdb/vendor/rocksdb/tools/simulated_hybrid_file_system.h +0 -124
  662. package/vendor/librocksdb/vendor/rocksdb/tools/sst_dump.cc +0 -12
  663. package/vendor/librocksdb/vendor/rocksdb/tools/sst_dump_tool.cc +0 -588
  664. package/vendor/librocksdb/vendor/rocksdb/tools/trace_analyzer.cc +0 -17
  665. package/vendor/librocksdb/vendor/rocksdb/tools/trace_analyzer_tool.cc +0 -1935
  666. package/vendor/librocksdb/vendor/rocksdb/tools/trace_analyzer_tool.h +0 -329
  667. package/vendor/librocksdb/vendor/rocksdb/tools/write_stress.cc +0 -305
  668. package/vendor/librocksdb/vendor/rocksdb/trace_replay/block_cache_tracer.cc +0 -509
  669. package/vendor/librocksdb/vendor/rocksdb/trace_replay/block_cache_tracer.h +0 -239
  670. package/vendor/librocksdb/vendor/rocksdb/trace_replay/io_tracer.cc +0 -303
  671. package/vendor/librocksdb/vendor/rocksdb/trace_replay/io_tracer.h +0 -185
  672. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record.cc +0 -206
  673. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record_handler.cc +0 -190
  674. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record_handler.h +0 -46
  675. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record_result.cc +0 -146
  676. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_replay.cc +0 -632
  677. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_replay.h +0 -184
  678. package/vendor/librocksdb/vendor/rocksdb/util/aligned_buffer.h +0 -235
  679. package/vendor/librocksdb/vendor/rocksdb/util/aligned_storage.h +0 -24
  680. package/vendor/librocksdb/vendor/rocksdb/util/async_file_reader.cc +0 -84
  681. package/vendor/librocksdb/vendor/rocksdb/util/async_file_reader.h +0 -144
  682. package/vendor/librocksdb/vendor/rocksdb/util/atomic.h +0 -111
  683. package/vendor/librocksdb/vendor/rocksdb/util/autovector.h +0 -397
  684. package/vendor/librocksdb/vendor/rocksdb/util/bloom_impl.h +0 -489
  685. package/vendor/librocksdb/vendor/rocksdb/util/build_version.cc.in +0 -79
  686. package/vendor/librocksdb/vendor/rocksdb/util/cast_util.h +0 -88
  687. package/vendor/librocksdb/vendor/rocksdb/util/channel.h +0 -69
  688. package/vendor/librocksdb/vendor/rocksdb/util/cleanable.cc +0 -181
  689. package/vendor/librocksdb/vendor/rocksdb/util/coding.cc +0 -90
  690. package/vendor/librocksdb/vendor/rocksdb/util/coding.h +0 -385
  691. package/vendor/librocksdb/vendor/rocksdb/util/coding_lean.h +0 -101
  692. package/vendor/librocksdb/vendor/rocksdb/util/compaction_job_stats_impl.cc +0 -94
  693. package/vendor/librocksdb/vendor/rocksdb/util/comparator.cc +0 -443
  694. package/vendor/librocksdb/vendor/rocksdb/util/compression.cc +0 -122
  695. package/vendor/librocksdb/vendor/rocksdb/util/compression.h +0 -1879
  696. package/vendor/librocksdb/vendor/rocksdb/util/compression_context_cache.cc +0 -106
  697. package/vendor/librocksdb/vendor/rocksdb/util/compression_context_cache.h +0 -47
  698. package/vendor/librocksdb/vendor/rocksdb/util/concurrent_task_limiter_impl.cc +0 -64
  699. package/vendor/librocksdb/vendor/rocksdb/util/concurrent_task_limiter_impl.h +0 -67
  700. package/vendor/librocksdb/vendor/rocksdb/util/core_local.h +0 -85
  701. package/vendor/librocksdb/vendor/rocksdb/util/coro_utils.h +0 -112
  702. package/vendor/librocksdb/vendor/rocksdb/util/crc32c.cc +0 -1295
  703. package/vendor/librocksdb/vendor/rocksdb/util/crc32c.h +0 -56
  704. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_arm64.cc +0 -213
  705. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_arm64.h +0 -51
  706. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc.c +0 -94
  707. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc.h +0 -21
  708. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc_asm.S +0 -756
  709. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc_constants.h +0 -900
  710. package/vendor/librocksdb/vendor/rocksdb/util/data_structure.cc +0 -16
  711. package/vendor/librocksdb/vendor/rocksdb/util/defer.h +0 -82
  712. package/vendor/librocksdb/vendor/rocksdb/util/distributed_mutex.h +0 -50
  713. package/vendor/librocksdb/vendor/rocksdb/util/duplicate_detector.h +0 -69
  714. package/vendor/librocksdb/vendor/rocksdb/util/dynamic_bloom.cc +0 -70
  715. package/vendor/librocksdb/vendor/rocksdb/util/dynamic_bloom.h +0 -214
  716. package/vendor/librocksdb/vendor/rocksdb/util/fastrange.h +0 -114
  717. package/vendor/librocksdb/vendor/rocksdb/util/file_checksum_helper.cc +0 -170
  718. package/vendor/librocksdb/vendor/rocksdb/util/file_checksum_helper.h +0 -101
  719. package/vendor/librocksdb/vendor/rocksdb/util/filter_bench.cc +0 -840
  720. package/vendor/librocksdb/vendor/rocksdb/util/gflags_compat.h +0 -29
  721. package/vendor/librocksdb/vendor/rocksdb/util/hash.cc +0 -201
  722. package/vendor/librocksdb/vendor/rocksdb/util/hash.h +0 -141
  723. package/vendor/librocksdb/vendor/rocksdb/util/hash128.h +0 -26
  724. package/vendor/librocksdb/vendor/rocksdb/util/hash_containers.h +0 -51
  725. package/vendor/librocksdb/vendor/rocksdb/util/hash_map.h +0 -67
  726. package/vendor/librocksdb/vendor/rocksdb/util/heap.h +0 -174
  727. package/vendor/librocksdb/vendor/rocksdb/util/kv_map.h +0 -33
  728. package/vendor/librocksdb/vendor/rocksdb/util/log_write_bench.cc +0 -88
  729. package/vendor/librocksdb/vendor/rocksdb/util/math.h +0 -351
  730. package/vendor/librocksdb/vendor/rocksdb/util/math128.h +0 -338
  731. package/vendor/librocksdb/vendor/rocksdb/util/murmurhash.cc +0 -196
  732. package/vendor/librocksdb/vendor/rocksdb/util/murmurhash.h +0 -43
  733. package/vendor/librocksdb/vendor/rocksdb/util/mutexlock.h +0 -189
  734. package/vendor/librocksdb/vendor/rocksdb/util/overload.h +0 -23
  735. package/vendor/librocksdb/vendor/rocksdb/util/ppc-opcode.h +0 -27
  736. package/vendor/librocksdb/vendor/rocksdb/util/random.cc +0 -63
  737. package/vendor/librocksdb/vendor/rocksdb/util/random.h +0 -190
  738. package/vendor/librocksdb/vendor/rocksdb/util/rate_limiter.cc +0 -391
  739. package/vendor/librocksdb/vendor/rocksdb/util/rate_limiter_impl.h +0 -156
  740. package/vendor/librocksdb/vendor/rocksdb/util/repeatable_thread.h +0 -149
  741. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_alg.h +0 -1225
  742. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_config.cc +0 -498
  743. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_config.h +0 -182
  744. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_impl.h +0 -1137
  745. package/vendor/librocksdb/vendor/rocksdb/util/set_comparator.h +0 -24
  746. package/vendor/librocksdb/vendor/rocksdb/util/single_thread_executor.h +0 -57
  747. package/vendor/librocksdb/vendor/rocksdb/util/slice.cc +0 -366
  748. package/vendor/librocksdb/vendor/rocksdb/util/status.cc +0 -163
  749. package/vendor/librocksdb/vendor/rocksdb/util/stderr_logger.cc +0 -62
  750. package/vendor/librocksdb/vendor/rocksdb/util/stderr_logger.h +0 -41
  751. package/vendor/librocksdb/vendor/rocksdb/util/stop_watch.h +0 -136
  752. package/vendor/librocksdb/vendor/rocksdb/util/string_util.cc +0 -554
  753. package/vendor/librocksdb/vendor/rocksdb/util/string_util.h +0 -185
  754. package/vendor/librocksdb/vendor/rocksdb/util/thread_guard.h +0 -41
  755. package/vendor/librocksdb/vendor/rocksdb/util/thread_local.cc +0 -521
  756. package/vendor/librocksdb/vendor/rocksdb/util/thread_local.h +0 -100
  757. package/vendor/librocksdb/vendor/rocksdb/util/thread_operation.h +0 -122
  758. package/vendor/librocksdb/vendor/rocksdb/util/threadpool_imp.cc +0 -550
  759. package/vendor/librocksdb/vendor/rocksdb/util/threadpool_imp.h +0 -120
  760. package/vendor/librocksdb/vendor/rocksdb/util/timer.h +0 -340
  761. package/vendor/librocksdb/vendor/rocksdb/util/timer_queue.h +0 -231
  762. package/vendor/librocksdb/vendor/rocksdb/util/udt_util.cc +0 -418
  763. package/vendor/librocksdb/vendor/rocksdb/util/udt_util.h +0 -275
  764. package/vendor/librocksdb/vendor/rocksdb/util/user_comparator_wrapper.h +0 -64
  765. package/vendor/librocksdb/vendor/rocksdb/util/vector_iterator.h +0 -114
  766. package/vendor/librocksdb/vendor/rocksdb/util/work_queue.h +0 -150
  767. package/vendor/librocksdb/vendor/rocksdb/util/write_batch_util.cc +0 -25
  768. package/vendor/librocksdb/vendor/rocksdb/util/write_batch_util.h +0 -90
  769. package/vendor/librocksdb/vendor/rocksdb/util/xxhash.cc +0 -48
  770. package/vendor/librocksdb/vendor/rocksdb/util/xxhash.h +0 -6364
  771. package/vendor/librocksdb/vendor/rocksdb/util/xxph3.h +0 -1760
  772. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/agg_merge.cc +0 -237
  773. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/agg_merge_impl.h +0 -49
  774. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/test_agg_merge.cc +0 -103
  775. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/test_agg_merge.h +0 -47
  776. package/vendor/librocksdb/vendor/rocksdb/utilities/backup/backup_engine.cc +0 -3357
  777. package/vendor/librocksdb/vendor/rocksdb/utilities/backup/backup_engine_impl.h +0 -34
  778. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_compaction_filter.cc +0 -490
  779. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_compaction_filter.h +0 -202
  780. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db.cc +0 -109
  781. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db.h +0 -231
  782. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_gc_stats.h +0 -54
  783. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_impl.cc +0 -2269
  784. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_impl.h +0 -514
  785. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_impl_filesnapshot.cc +0 -127
  786. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_iterator.h +0 -148
  787. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_listener.h +0 -71
  788. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_dump_tool.cc +0 -276
  789. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_dump_tool.h +0 -56
  790. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_file.cc +0 -311
  791. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_file.h +0 -245
  792. package/vendor/librocksdb/vendor/rocksdb/utilities/cache_dump_load.cc +0 -67
  793. package/vendor/librocksdb/vendor/rocksdb/utilities/cache_dump_load_impl.cc +0 -389
  794. package/vendor/librocksdb/vendor/rocksdb/utilities/cache_dump_load_impl.h +0 -368
  795. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/cassandra_compaction_filter.cc +0 -104
  796. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/cassandra_compaction_filter.h +0 -57
  797. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/cassandra_options.h +0 -41
  798. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/format.cc +0 -365
  799. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/format.h +0 -183
  800. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/merge_operator.cc +0 -76
  801. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/merge_operator.h +0 -43
  802. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/serialize.h +0 -81
  803. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/test_utils.cc +0 -67
  804. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/test_utils.h +0 -42
  805. package/vendor/librocksdb/vendor/rocksdb/utilities/checkpoint/checkpoint_impl.cc +0 -472
  806. package/vendor/librocksdb/vendor/rocksdb/utilities/checkpoint/checkpoint_impl.h +0 -64
  807. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters/layered_compaction_filter_base.h +0 -41
  808. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc +0 -24
  809. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.h +0 -26
  810. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters.cc +0 -52
  811. package/vendor/librocksdb/vendor/rocksdb/utilities/convenience/info_log_finder.cc +0 -26
  812. package/vendor/librocksdb/vendor/rocksdb/utilities/counted_fs.cc +0 -379
  813. package/vendor/librocksdb/vendor/rocksdb/utilities/counted_fs.h +0 -158
  814. package/vendor/librocksdb/vendor/rocksdb/utilities/debug.cc +0 -134
  815. package/vendor/librocksdb/vendor/rocksdb/utilities/env_mirror.cc +0 -280
  816. package/vendor/librocksdb/vendor/rocksdb/utilities/env_timed.cc +0 -181
  817. package/vendor/librocksdb/vendor/rocksdb/utilities/env_timed.h +0 -95
  818. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_env.cc +0 -555
  819. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_env.h +0 -252
  820. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_fs.cc +0 -1507
  821. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_fs.h +0 -760
  822. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_secondary_cache.cc +0 -138
  823. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_secondary_cache.h +0 -115
  824. package/vendor/librocksdb/vendor/rocksdb/utilities/leveldb_options/leveldb_options.cc +0 -57
  825. package/vendor/librocksdb/vendor/rocksdb/utilities/memory/memory_util.cc +0 -50
  826. package/vendor/librocksdb/vendor/rocksdb/utilities/memory_allocators.h +0 -103
  827. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/bytesxor.cc +0 -57
  828. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/bytesxor.h +0 -39
  829. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/max.cc +0 -64
  830. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/max_operator.h +0 -35
  831. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/put.cc +0 -74
  832. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/put_operator.h +0 -56
  833. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/sortlist.cc +0 -97
  834. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/sortlist.h +0 -42
  835. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend.cc +0 -76
  836. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend.h +0 -32
  837. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend2.cc +0 -129
  838. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend2.h +0 -51
  839. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/uint64add.cc +0 -56
  840. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/uint64add.h +0 -35
  841. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators.cc +0 -115
  842. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators.h +0 -36
  843. package/vendor/librocksdb/vendor/rocksdb/utilities/object_registry.cc +0 -381
  844. package/vendor/librocksdb/vendor/rocksdb/utilities/option_change_migration/option_change_migration.cc +0 -169
  845. package/vendor/librocksdb/vendor/rocksdb/utilities/options/options_util.cc +0 -117
  846. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier.cc +0 -420
  847. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier.h +0 -154
  848. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc +0 -607
  849. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_file.h +0 -291
  850. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_file_buffer.h +0 -127
  851. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.cc +0 -84
  852. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.h +0 -122
  853. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/hash_table.h +0 -237
  854. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/hash_table_bench.cc +0 -310
  855. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/hash_table_evictable.h +0 -166
  856. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/lrulist.h +0 -172
  857. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_bench.cc +0 -355
  858. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_test.h +0 -284
  859. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_tier.cc +0 -165
  860. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_tier.h +0 -340
  861. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_util.h +0 -67
  862. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc +0 -138
  863. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/volatile_tier_impl.h +0 -139
  864. package/vendor/librocksdb/vendor/rocksdb/utilities/simulator_cache/cache_simulator.cc +0 -287
  865. package/vendor/librocksdb/vendor/rocksdb/utilities/simulator_cache/cache_simulator.h +0 -231
  866. package/vendor/librocksdb/vendor/rocksdb/utilities/simulator_cache/sim_cache.cc +0 -375
  867. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_for_tiering_collector.cc +0 -144
  868. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_for_tiering_collector.h +0 -45
  869. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.cc +0 -233
  870. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.h +0 -65
  871. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/file_trace_reader_writer.cc +0 -132
  872. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/file_trace_reader_writer.h +0 -48
  873. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/replayer_impl.cc +0 -313
  874. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/replayer_impl.h +0 -84
  875. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/lock_manager.cc +0 -27
  876. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/lock_manager.h +0 -80
  877. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/lock_tracker.h +0 -207
  878. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_manager.cc +0 -718
  879. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_manager.h +0 -222
  880. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_manager_test.h +0 -324
  881. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_tracker.cc +0 -255
  882. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_tracker.h +0 -97
  883. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_lock_manager.h +0 -34
  884. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/db.h +0 -81
  885. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/ft/comparator.h +0 -138
  886. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/ft/ft-status.h +0 -102
  887. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/concurrent_tree.cc +0 -137
  888. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/concurrent_tree.h +0 -174
  889. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/keyrange.cc +0 -220
  890. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/keyrange.h +0 -141
  891. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.cc +0 -525
  892. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.h +0 -255
  893. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/locktree.cc +0 -1021
  894. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/locktree.h +0 -580
  895. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/manager.cc +0 -525
  896. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/range_buffer.cc +0 -263
  897. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/range_buffer.h +0 -178
  898. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/treenode.cc +0 -518
  899. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/treenode.h +0 -302
  900. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/txnid_set.cc +0 -118
  901. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/txnid_set.h +0 -92
  902. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/wfg.cc +0 -211
  903. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/wfg.h +0 -124
  904. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/memory.h +0 -215
  905. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_assert_subst.h +0 -43
  906. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h +0 -130
  907. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_external_pthread.h +0 -87
  908. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_instrumentation.h +0 -286
  909. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_portability.h +0 -87
  910. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_pthread.h +0 -520
  911. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_race_tools.h +0 -179
  912. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +0 -197
  913. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/txn_subst.h +0 -31
  914. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/standalone_port.cc +0 -139
  915. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/dbt.cc +0 -165
  916. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/dbt.h +0 -98
  917. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/growable_array.h +0 -144
  918. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/memarena.cc +0 -199
  919. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/memarena.h +0 -141
  920. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/omt.h +0 -794
  921. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/omt_impl.h +0 -1295
  922. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/partitioned_counter.h +0 -165
  923. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/status.h +0 -76
  924. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc +0 -501
  925. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.h +0 -135
  926. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_tracker.cc +0 -156
  927. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_tracker.h +0 -146
  928. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction.cc +0 -208
  929. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction.h +0 -99
  930. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction_db_impl.cc +0 -111
  931. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction_db_impl.h +0 -110
  932. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction.cc +0 -1278
  933. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction.h +0 -345
  934. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction_db.cc +0 -845
  935. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction_db.h +0 -345
  936. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/snapshot_checker.cc +0 -37
  937. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_base.cc +0 -912
  938. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_base.h +0 -455
  939. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_db_mutex_impl.cc +0 -133
  940. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_db_mutex_impl.h +0 -24
  941. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_test.h +0 -589
  942. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_util.cc +0 -207
  943. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_util.h +0 -86
  944. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn.cc +0 -548
  945. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn.h +0 -118
  946. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn_db.cc +0 -1100
  947. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn_db.h +0 -1149
  948. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn.cc +0 -1089
  949. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn.h +0 -333
  950. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn_db.cc +0 -486
  951. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn_db.h +0 -105
  952. package/vendor/librocksdb/vendor/rocksdb/utilities/ttl/db_ttl_impl.cc +0 -638
  953. package/vendor/librocksdb/vendor/rocksdb/utilities/ttl/db_ttl_impl.h +0 -239
  954. package/vendor/librocksdb/vendor/rocksdb/utilities/types_util.cc +0 -88
  955. package/vendor/librocksdb/vendor/rocksdb/utilities/wal_filter.cc +0 -22
  956. package/vendor/librocksdb/vendor/rocksdb/utilities/write_batch_with_index/write_batch_with_index.cc +0 -1134
  957. package/vendor/librocksdb/vendor/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.cc +0 -934
  958. package/vendor/librocksdb/vendor/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.h +0 -468
@@ -1,2325 +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
- #include <cinttypes>
10
-
11
- #include "db/builder.h"
12
- #include "db/db_impl/db_impl.h"
13
- #include "db/error_handler.h"
14
- #include "db/periodic_task_scheduler.h"
15
- #include "env/composite_env_wrapper.h"
16
- #include "file/filename.h"
17
- #include "file/read_write_util.h"
18
- #include "file/sst_file_manager_impl.h"
19
- #include "file/writable_file_writer.h"
20
- #include "logging/logging.h"
21
- #include "monitoring/persistent_stats_history.h"
22
- #include "monitoring/thread_status_util.h"
23
- #include "options/options_helper.h"
24
- #include "rocksdb/options.h"
25
- #include "rocksdb/table.h"
26
- #include "rocksdb/wal_filter.h"
27
- #include "test_util/sync_point.h"
28
- #include "util/rate_limiter_impl.h"
29
- #include "util/string_util.h"
30
- #include "util/udt_util.h"
31
-
32
- namespace ROCKSDB_NAMESPACE {
33
- Options SanitizeOptions(const std::string& dbname, const Options& src,
34
- bool read_only, Status* logger_creation_s) {
35
- auto db_options =
36
- SanitizeOptions(dbname, DBOptions(src), read_only, logger_creation_s);
37
- ImmutableDBOptions immutable_db_options(db_options);
38
- auto cf_options =
39
- SanitizeOptions(immutable_db_options, ColumnFamilyOptions(src));
40
- return Options(db_options, cf_options);
41
- }
42
-
43
- DBOptions SanitizeOptions(const std::string& dbname, const DBOptions& src,
44
- bool read_only, Status* logger_creation_s) {
45
- DBOptions result(src);
46
-
47
- if (result.env == nullptr) {
48
- result.env = Env::Default();
49
- }
50
-
51
- // result.max_open_files means an "infinite" open files.
52
- if (result.max_open_files != -1) {
53
- int max_max_open_files = port::GetMaxOpenFiles();
54
- if (max_max_open_files == -1) {
55
- max_max_open_files = 0x400000;
56
- }
57
- ClipToRange(&result.max_open_files, 20, max_max_open_files);
58
- TEST_SYNC_POINT_CALLBACK("SanitizeOptions::AfterChangeMaxOpenFiles",
59
- &result.max_open_files);
60
- }
61
-
62
- if (result.info_log == nullptr && !read_only) {
63
- Status s = CreateLoggerFromOptions(dbname, result, &result.info_log);
64
- if (!s.ok()) {
65
- // No place suitable for logging
66
- result.info_log = nullptr;
67
- if (logger_creation_s) {
68
- *logger_creation_s = s;
69
- }
70
- }
71
- }
72
-
73
- if (!result.write_buffer_manager) {
74
- result.write_buffer_manager.reset(
75
- new WriteBufferManager(result.db_write_buffer_size));
76
- }
77
- auto bg_job_limits = DBImpl::GetBGJobLimits(
78
- result.max_background_flushes, result.max_background_compactions,
79
- result.max_background_jobs, true /* parallelize_compactions */);
80
- result.env->IncBackgroundThreadsIfNeeded(bg_job_limits.max_compactions,
81
- Env::Priority::LOW);
82
- result.env->IncBackgroundThreadsIfNeeded(bg_job_limits.max_flushes,
83
- Env::Priority::HIGH);
84
-
85
- if (result.rate_limiter.get() != nullptr) {
86
- if (result.bytes_per_sync == 0) {
87
- result.bytes_per_sync = 1024 * 1024;
88
- }
89
- }
90
-
91
- if (result.delayed_write_rate == 0) {
92
- if (result.rate_limiter.get() != nullptr) {
93
- result.delayed_write_rate = result.rate_limiter->GetBytesPerSecond();
94
- }
95
- if (result.delayed_write_rate == 0) {
96
- result.delayed_write_rate = 16 * 1024 * 1024;
97
- }
98
- }
99
-
100
- if (result.WAL_ttl_seconds > 0 || result.WAL_size_limit_MB > 0) {
101
- result.recycle_log_file_num = false;
102
- }
103
-
104
- if (result.recycle_log_file_num &&
105
- (result.wal_recovery_mode ==
106
- WALRecoveryMode::kTolerateCorruptedTailRecords ||
107
- result.wal_recovery_mode == WALRecoveryMode::kAbsoluteConsistency)) {
108
- // - kTolerateCorruptedTailRecords is inconsistent with recycle log file
109
- // feature. WAL recycling expects recovery success upon encountering a
110
- // corrupt record at the point where new data ends and recycled data
111
- // remains at the tail. However, `kTolerateCorruptedTailRecords` must fail
112
- // upon encountering any such corrupt record, as it cannot differentiate
113
- // between this and a real corruption, which would cause committed updates
114
- // to be truncated -- a violation of the recovery guarantee.
115
- // - kPointInTimeRecovery and kAbsoluteConsistency are incompatible with
116
- // recycle log file feature temporarily due to a bug found introducing a
117
- // hole in the recovered data
118
- // (https://github.com/facebook/rocksdb/pull/7252#issuecomment-673766236).
119
- // Besides this bug, we believe the features are fundamentally compatible.
120
- result.recycle_log_file_num = 0;
121
- }
122
-
123
- if (result.db_paths.size() == 0) {
124
- result.db_paths.emplace_back(dbname, std::numeric_limits<uint64_t>::max());
125
- } else if (result.wal_dir.empty()) {
126
- // Use dbname as default
127
- result.wal_dir = dbname;
128
- }
129
- if (!result.wal_dir.empty()) {
130
- // If there is a wal_dir already set, check to see if the wal_dir is the
131
- // same as the dbname AND the same as the db_path[0] (which must exist from
132
- // a few lines ago). If the wal_dir matches both of these values, then clear
133
- // the wal_dir value, which will make wal_dir == dbname. Most likely this
134
- // condition was the result of reading an old options file where we forced
135
- // wal_dir to be set (to dbname).
136
- auto npath = NormalizePath(dbname + "/");
137
- if (npath == NormalizePath(result.wal_dir + "/") &&
138
- npath == NormalizePath(result.db_paths[0].path + "/")) {
139
- result.wal_dir.clear();
140
- }
141
- }
142
-
143
- if (!result.wal_dir.empty() && result.wal_dir.back() == '/') {
144
- result.wal_dir = result.wal_dir.substr(0, result.wal_dir.size() - 1);
145
- }
146
-
147
- // Force flush on DB open if 2PC is enabled, since with 2PC we have no
148
- // guarantee that consecutive log files have consecutive sequence id, which
149
- // make recovery complicated.
150
- if (result.allow_2pc) {
151
- result.avoid_flush_during_recovery = false;
152
- }
153
-
154
- ImmutableDBOptions immutable_db_options(result);
155
- if (!immutable_db_options.IsWalDirSameAsDBPath()) {
156
- // Either the WAL dir and db_paths[0]/db_name are not the same, or we
157
- // cannot tell for sure. In either case, assume they're different and
158
- // explicitly cleanup the trash log files (bypass DeleteScheduler)
159
- // Do this first so even if we end up calling
160
- // DeleteScheduler::CleanupDirectory on the same dir later, it will be
161
- // safe
162
- std::vector<std::string> filenames;
163
- IOOptions io_opts;
164
- io_opts.do_not_recurse = true;
165
- auto wal_dir = immutable_db_options.GetWalDir();
166
- Status s = immutable_db_options.fs->GetChildren(
167
- wal_dir, io_opts, &filenames, /*IODebugContext*=*/nullptr);
168
- s.PermitUncheckedError(); //**TODO: What to do on error?
169
- for (std::string& filename : filenames) {
170
- if (filename.find(".log.trash", filename.length() -
171
- std::string(".log.trash").length()) !=
172
- std::string::npos) {
173
- std::string trash_file = wal_dir + "/" + filename;
174
- result.env->DeleteFile(trash_file).PermitUncheckedError();
175
- }
176
- }
177
- }
178
-
179
- // Create a default SstFileManager for purposes of tracking compaction size
180
- // and facilitating recovery from out of space errors.
181
- if (result.sst_file_manager.get() == nullptr) {
182
- std::shared_ptr<SstFileManager> sst_file_manager(
183
- NewSstFileManager(result.env, result.info_log));
184
- result.sst_file_manager = sst_file_manager;
185
- }
186
-
187
- // Supported wal compression types
188
- if (!StreamingCompressionTypeSupported(result.wal_compression)) {
189
- result.wal_compression = kNoCompression;
190
- ROCKS_LOG_WARN(result.info_log,
191
- "wal_compression is disabled since only zstd is supported");
192
- }
193
-
194
- if (!result.paranoid_checks) {
195
- result.skip_checking_sst_file_sizes_on_db_open = true;
196
- ROCKS_LOG_INFO(result.info_log,
197
- "file size check will be skipped during open.");
198
- }
199
-
200
- return result;
201
- }
202
-
203
- namespace {
204
- Status ValidateOptionsByTable(
205
- const DBOptions& db_opts,
206
- const std::vector<ColumnFamilyDescriptor>& column_families) {
207
- Status s;
208
- for (auto& cf : column_families) {
209
- s = ValidateOptions(db_opts, cf.options);
210
- if (!s.ok()) {
211
- return s;
212
- }
213
- }
214
- return Status::OK();
215
- }
216
- } // namespace
217
-
218
- Status DBImpl::ValidateOptions(
219
- const DBOptions& db_options,
220
- const std::vector<ColumnFamilyDescriptor>& column_families) {
221
- Status s;
222
- for (auto& cfd : column_families) {
223
- s = ColumnFamilyData::ValidateOptions(db_options, cfd.options);
224
- if (!s.ok()) {
225
- return s;
226
- }
227
- }
228
- s = ValidateOptions(db_options);
229
- return s;
230
- }
231
-
232
- Status DBImpl::ValidateOptions(const DBOptions& db_options) {
233
- if (db_options.db_paths.size() > 4) {
234
- return Status::NotSupported(
235
- "More than four DB paths are not supported yet. ");
236
- }
237
-
238
- if (db_options.allow_mmap_reads && db_options.use_direct_reads) {
239
- // Protect against assert in PosixMMapReadableFile constructor
240
- return Status::NotSupported(
241
- "If memory mapped reads (allow_mmap_reads) are enabled "
242
- "then direct I/O reads (use_direct_reads) must be disabled. ");
243
- }
244
-
245
- if (db_options.allow_mmap_writes &&
246
- db_options.use_direct_io_for_flush_and_compaction) {
247
- return Status::NotSupported(
248
- "If memory mapped writes (allow_mmap_writes) are enabled "
249
- "then direct I/O writes (use_direct_io_for_flush_and_compaction) must "
250
- "be disabled. ");
251
- }
252
-
253
- if (db_options.keep_log_file_num == 0) {
254
- return Status::InvalidArgument("keep_log_file_num must be greater than 0");
255
- }
256
-
257
- if (db_options.unordered_write &&
258
- !db_options.allow_concurrent_memtable_write) {
259
- return Status::InvalidArgument(
260
- "unordered_write is incompatible with "
261
- "!allow_concurrent_memtable_write");
262
- }
263
-
264
- if (db_options.unordered_write && db_options.enable_pipelined_write) {
265
- return Status::InvalidArgument(
266
- "unordered_write is incompatible with enable_pipelined_write");
267
- }
268
-
269
- if (db_options.atomic_flush && db_options.enable_pipelined_write) {
270
- return Status::InvalidArgument(
271
- "atomic_flush is incompatible with enable_pipelined_write");
272
- }
273
-
274
- if (db_options.use_direct_io_for_flush_and_compaction &&
275
- 0 == db_options.writable_file_max_buffer_size) {
276
- return Status::InvalidArgument(
277
- "writes in direct IO require writable_file_max_buffer_size > 0");
278
- }
279
-
280
- if (db_options.daily_offpeak_time_utc != "") {
281
- int start_time, end_time;
282
- if (!TryParseTimeRangeString(db_options.daily_offpeak_time_utc, start_time,
283
- end_time)) {
284
- return Status::InvalidArgument(
285
- "daily_offpeak_time_utc should be set in the format HH:mm-HH:mm "
286
- "(e.g. 04:30-07:30)");
287
- } else if (start_time == end_time) {
288
- return Status::InvalidArgument(
289
- "start_time and end_time cannot be the same");
290
- }
291
- }
292
- return Status::OK();
293
- }
294
-
295
- Status DBImpl::NewDB(std::vector<std::string>* new_filenames) {
296
- VersionEdit new_db;
297
- const WriteOptions write_options(Env::IOActivity::kDBOpen);
298
- Status s = SetIdentityFile(write_options, env_, dbname_);
299
- if (!s.ok()) {
300
- return s;
301
- }
302
- if (immutable_db_options_.write_dbid_to_manifest) {
303
- std::string temp_db_id;
304
- s = GetDbIdentityFromIdentityFile(&temp_db_id);
305
- if (!s.ok()) {
306
- return s;
307
- }
308
- new_db.SetDBId(temp_db_id);
309
- }
310
- new_db.SetLogNumber(0);
311
- new_db.SetNextFile(2);
312
- new_db.SetLastSequence(0);
313
-
314
- ROCKS_LOG_INFO(immutable_db_options_.info_log, "Creating manifest 1 \n");
315
- const std::string manifest = DescriptorFileName(dbname_, 1);
316
- {
317
- if (fs_->FileExists(manifest, IOOptions(), nullptr).ok()) {
318
- fs_->DeleteFile(manifest, IOOptions(), nullptr).PermitUncheckedError();
319
- }
320
- std::unique_ptr<FSWritableFile> file;
321
- FileOptions file_options = fs_->OptimizeForManifestWrite(file_options_);
322
- s = NewWritableFile(fs_.get(), manifest, &file, file_options);
323
- if (!s.ok()) {
324
- return s;
325
- }
326
- FileTypeSet tmp_set = immutable_db_options_.checksum_handoff_file_types;
327
- file->SetPreallocationBlockSize(
328
- immutable_db_options_.manifest_preallocation_size);
329
- std::unique_ptr<WritableFileWriter> file_writer(new WritableFileWriter(
330
- std::move(file), manifest, file_options, immutable_db_options_.clock,
331
- io_tracer_, nullptr /* stats */,
332
- Histograms::HISTOGRAM_ENUM_MAX /* hist_type */,
333
- immutable_db_options_.listeners, nullptr,
334
- tmp_set.Contains(FileType::kDescriptorFile),
335
- tmp_set.Contains(FileType::kDescriptorFile)));
336
- log::Writer log(std::move(file_writer), 0, false);
337
- std::string record;
338
- new_db.EncodeTo(&record);
339
- s = log.AddRecord(write_options, record);
340
- if (s.ok()) {
341
- s = SyncManifest(&immutable_db_options_, write_options, log.file());
342
- }
343
- }
344
- if (s.ok()) {
345
- // Make "CURRENT" file that points to the new manifest file.
346
- s = SetCurrentFile(write_options, fs_.get(), dbname_, 1,
347
- directories_.GetDbDir());
348
- if (new_filenames) {
349
- new_filenames->emplace_back(
350
- manifest.substr(manifest.find_last_of("/\\") + 1));
351
- }
352
- } else {
353
- fs_->DeleteFile(manifest, IOOptions(), nullptr).PermitUncheckedError();
354
- }
355
- return s;
356
- }
357
-
358
- IOStatus DBImpl::CreateAndNewDirectory(
359
- FileSystem* fs, const std::string& dirname,
360
- std::unique_ptr<FSDirectory>* directory) {
361
- // We call CreateDirIfMissing() as the directory may already exist (if we
362
- // are reopening a DB), when this happens we don't want creating the
363
- // directory to cause an error. However, we need to check if creating the
364
- // directory fails or else we may get an obscure message about the lock
365
- // file not existing. One real-world example of this occurring is if
366
- // env->CreateDirIfMissing() doesn't create intermediate directories, e.g.
367
- // when dbname_ is "dir/db" but when "dir" doesn't exist.
368
- IOStatus io_s = fs->CreateDirIfMissing(dirname, IOOptions(), nullptr);
369
- if (!io_s.ok()) {
370
- return io_s;
371
- }
372
- return fs->NewDirectory(dirname, IOOptions(), directory, nullptr);
373
- }
374
-
375
- IOStatus Directories::SetDirectories(FileSystem* fs, const std::string& dbname,
376
- const std::string& wal_dir,
377
- const std::vector<DbPath>& data_paths) {
378
- IOStatus io_s = DBImpl::CreateAndNewDirectory(fs, dbname, &db_dir_);
379
- if (!io_s.ok()) {
380
- return io_s;
381
- }
382
- if (!wal_dir.empty() && dbname != wal_dir) {
383
- io_s = DBImpl::CreateAndNewDirectory(fs, wal_dir, &wal_dir_);
384
- if (!io_s.ok()) {
385
- return io_s;
386
- }
387
- }
388
-
389
- data_dirs_.clear();
390
- for (auto& p : data_paths) {
391
- const std::string db_path = p.path;
392
- if (db_path == dbname) {
393
- data_dirs_.emplace_back(nullptr);
394
- } else {
395
- std::unique_ptr<FSDirectory> path_directory;
396
- io_s = DBImpl::CreateAndNewDirectory(fs, db_path, &path_directory);
397
- if (!io_s.ok()) {
398
- return io_s;
399
- }
400
- data_dirs_.emplace_back(path_directory.release());
401
- }
402
- }
403
- assert(data_dirs_.size() == data_paths.size());
404
- return IOStatus::OK();
405
- }
406
-
407
- Status DBImpl::Recover(
408
- const std::vector<ColumnFamilyDescriptor>& column_families, bool read_only,
409
- bool error_if_wal_file_exists, bool error_if_data_exists_in_wals,
410
- bool is_retry, uint64_t* recovered_seq, RecoveryContext* recovery_ctx,
411
- bool* can_retry) {
412
- mutex_.AssertHeld();
413
-
414
- const WriteOptions write_options(Env::IOActivity::kDBOpen);
415
- bool tmp_is_new_db = false;
416
- bool& is_new_db = recovery_ctx ? recovery_ctx->is_new_db_ : tmp_is_new_db;
417
- assert(db_lock_ == nullptr);
418
- std::vector<std::string> files_in_dbname;
419
- if (!read_only) {
420
- Status s = directories_.SetDirectories(fs_.get(), dbname_,
421
- immutable_db_options_.wal_dir,
422
- immutable_db_options_.db_paths);
423
- if (!s.ok()) {
424
- return s;
425
- }
426
-
427
- s = env_->LockFile(LockFileName(dbname_), &db_lock_);
428
- if (!s.ok()) {
429
- return s;
430
- }
431
-
432
- std::string current_fname = CurrentFileName(dbname_);
433
- // Path to any MANIFEST file in the db dir. It does not matter which one.
434
- // Since best-efforts recovery ignores CURRENT file, existence of a
435
- // MANIFEST indicates the recovery to recover existing db. If no MANIFEST
436
- // can be found, a new db will be created.
437
- std::string manifest_path;
438
- if (!immutable_db_options_.best_efforts_recovery) {
439
- s = env_->FileExists(current_fname);
440
- } else {
441
- s = Status::NotFound();
442
- IOOptions io_opts;
443
- io_opts.do_not_recurse = true;
444
- Status io_s = immutable_db_options_.fs->GetChildren(
445
- dbname_, io_opts, &files_in_dbname, /*IODebugContext*=*/nullptr);
446
- if (!io_s.ok()) {
447
- s = io_s;
448
- files_in_dbname.clear();
449
- }
450
- for (const std::string& file : files_in_dbname) {
451
- uint64_t number = 0;
452
- FileType type = kWalFile; // initialize
453
- if (ParseFileName(file, &number, &type) && type == kDescriptorFile) {
454
- uint64_t bytes;
455
- s = env_->GetFileSize(DescriptorFileName(dbname_, number), &bytes);
456
- if (s.ok() && bytes != 0) {
457
- // Found non-empty MANIFEST (descriptor log), thus best-efforts
458
- // recovery does not have to treat the db as empty.
459
- manifest_path = dbname_ + "/" + file;
460
- break;
461
- }
462
- }
463
- }
464
- }
465
- if (s.IsNotFound()) {
466
- if (immutable_db_options_.create_if_missing) {
467
- s = NewDB(&files_in_dbname);
468
- is_new_db = true;
469
- if (!s.ok()) {
470
- return s;
471
- }
472
- } else {
473
- return Status::InvalidArgument(
474
- current_fname, "does not exist (create_if_missing is false)");
475
- }
476
- } else if (s.ok()) {
477
- if (immutable_db_options_.error_if_exists) {
478
- return Status::InvalidArgument(dbname_,
479
- "exists (error_if_exists is true)");
480
- }
481
- } else {
482
- // Unexpected error reading file
483
- assert(s.IsIOError());
484
- return s;
485
- }
486
- // Verify compatibility of file_options_ and filesystem
487
- {
488
- std::unique_ptr<FSRandomAccessFile> idfile;
489
- FileOptions customized_fs(file_options_);
490
- customized_fs.use_direct_reads |=
491
- immutable_db_options_.use_direct_io_for_flush_and_compaction;
492
- const std::string& fname =
493
- manifest_path.empty() ? current_fname : manifest_path;
494
- s = fs_->NewRandomAccessFile(fname, customized_fs, &idfile, nullptr);
495
- if (!s.ok()) {
496
- std::string error_str = s.ToString();
497
- // Check if unsupported Direct I/O is the root cause
498
- customized_fs.use_direct_reads = false;
499
- s = fs_->NewRandomAccessFile(fname, customized_fs, &idfile, nullptr);
500
- if (s.ok()) {
501
- return Status::InvalidArgument(
502
- "Direct I/O is not supported by the specified DB.");
503
- } else {
504
- return Status::InvalidArgument(
505
- "Found options incompatible with filesystem", error_str.c_str());
506
- }
507
- }
508
- }
509
- } else if (immutable_db_options_.best_efforts_recovery) {
510
- assert(files_in_dbname.empty());
511
- IOOptions io_opts;
512
- io_opts.do_not_recurse = true;
513
- Status s = immutable_db_options_.fs->GetChildren(
514
- dbname_, io_opts, &files_in_dbname, /*IODebugContext*=*/nullptr);
515
- if (s.IsNotFound()) {
516
- return Status::InvalidArgument(dbname_,
517
- "does not exist (open for read only)");
518
- } else if (s.IsIOError()) {
519
- return s;
520
- }
521
- assert(s.ok());
522
- }
523
- assert(db_id_.empty());
524
- Status s;
525
- bool missing_table_file = false;
526
- if (!immutable_db_options_.best_efforts_recovery) {
527
- // Status of reading the descriptor file
528
- Status desc_status;
529
- s = versions_->Recover(column_families, read_only, &db_id_,
530
- /*no_error_if_files_missing=*/false, is_retry,
531
- &desc_status);
532
- desc_status.PermitUncheckedError();
533
- if (can_retry) {
534
- // If we're opening for the first time and the failure is likely due to
535
- // a corrupt MANIFEST file (could result in either the log::Reader
536
- // detecting a corrupt record, or SST files not found error due to
537
- // discarding badly formed tail records)
538
- if (!is_retry &&
539
- (desc_status.IsCorruption() || s.IsNotFound() || s.IsCorruption()) &&
540
- CheckFSFeatureSupport(fs_.get(),
541
- FSSupportedOps::kVerifyAndReconstructRead)) {
542
- *can_retry = true;
543
- ROCKS_LOG_ERROR(
544
- immutable_db_options_.info_log,
545
- "Possible corruption detected while replaying MANIFEST %s, %s. "
546
- "Will be retried.",
547
- desc_status.ToString().c_str(), s.ToString().c_str());
548
- } else {
549
- *can_retry = false;
550
- }
551
- }
552
- } else {
553
- assert(!files_in_dbname.empty());
554
- s = versions_->TryRecover(column_families, read_only, files_in_dbname,
555
- &db_id_, &missing_table_file);
556
- if (s.ok()) {
557
- // TryRecover may delete previous column_family_set_.
558
- column_family_memtables_.reset(
559
- new ColumnFamilyMemTablesImpl(versions_->GetColumnFamilySet()));
560
- }
561
- }
562
- if (!s.ok()) {
563
- return s;
564
- }
565
- if (s.ok() && !read_only) {
566
- for (auto cfd : *versions_->GetColumnFamilySet()) {
567
- // Try to trivially move files down the LSM tree to start from bottommost
568
- // level when level_compaction_dynamic_level_bytes is enabled. This should
569
- // only be useful when user is migrating to turning on this option.
570
- // If a user is migrating from Level Compaction with a smaller level
571
- // multiplier or from Universal Compaction, there may be too many
572
- // non-empty levels and the trivial moves here are not sufficed for
573
- // migration. Additional compactions are needed to drain unnecessary
574
- // levels.
575
- //
576
- // Note that this step moves files down LSM without consulting
577
- // SSTPartitioner. Further compactions are still needed if
578
- // the user wants to partition SST files.
579
- // Note that files moved in this step may not respect the compression
580
- // option in target level.
581
- if (cfd->ioptions()->compaction_style ==
582
- CompactionStyle::kCompactionStyleLevel &&
583
- cfd->ioptions()->level_compaction_dynamic_level_bytes &&
584
- !cfd->GetLatestMutableCFOptions()->disable_auto_compactions) {
585
- int to_level = cfd->ioptions()->num_levels - 1;
586
- // last level is reserved
587
- // allow_ingest_behind does not support Level Compaction,
588
- // and per_key_placement can have infinite compaction loop for Level
589
- // Compaction. Adjust to_level here just to be safe.
590
- if (cfd->ioptions()->allow_ingest_behind ||
591
- cfd->ioptions()->preclude_last_level_data_seconds > 0) {
592
- to_level -= 1;
593
- }
594
- // Whether this column family has a level trivially moved
595
- bool moved = false;
596
- // Fill the LSM starting from to_level and going up one level at a time.
597
- // Some loop invariants (when last level is not reserved):
598
- // - levels in (from_level, to_level] are empty, and
599
- // - levels in (to_level, last_level] are non-empty.
600
- for (int from_level = to_level; from_level >= 0; --from_level) {
601
- const std::vector<FileMetaData*>& level_files =
602
- cfd->current()->storage_info()->LevelFiles(from_level);
603
- if (level_files.empty() || from_level == 0) {
604
- continue;
605
- }
606
- assert(from_level <= to_level);
607
- // Trivial move files from `from_level` to `to_level`
608
- if (from_level < to_level) {
609
- if (!moved) {
610
- // lsm_state will look like "[1,2,3,4,5,6,0]" for an LSM with
611
- // 7 levels
612
- std::string lsm_state = "[";
613
- for (int i = 0; i < cfd->ioptions()->num_levels; ++i) {
614
- lsm_state += std::to_string(
615
- cfd->current()->storage_info()->NumLevelFiles(i));
616
- if (i < cfd->ioptions()->num_levels - 1) {
617
- lsm_state += ",";
618
- }
619
- }
620
- lsm_state += "]";
621
- ROCKS_LOG_WARN(immutable_db_options_.info_log,
622
- "[%s] Trivially move files down the LSM when open "
623
- "with level_compaction_dynamic_level_bytes=true,"
624
- " lsm_state: %s (Files are moved only if DB "
625
- "Recovery is successful).",
626
- cfd->GetName().c_str(), lsm_state.c_str());
627
- moved = true;
628
- }
629
- ROCKS_LOG_WARN(
630
- immutable_db_options_.info_log,
631
- "[%s] Moving %zu files from from_level-%d to from_level-%d",
632
- cfd->GetName().c_str(), level_files.size(), from_level,
633
- to_level);
634
- VersionEdit edit;
635
- edit.SetColumnFamily(cfd->GetID());
636
- for (const FileMetaData* f : level_files) {
637
- edit.DeleteFile(from_level, f->fd.GetNumber());
638
- edit.AddFile(to_level, f->fd.GetNumber(), f->fd.GetPathId(),
639
- f->fd.GetFileSize(), f->smallest, f->largest,
640
- f->fd.smallest_seqno, f->fd.largest_seqno,
641
- f->marked_for_compaction,
642
- f->temperature, // this can be different from
643
- // `last_level_temperature`
644
- f->oldest_blob_file_number, f->oldest_ancester_time,
645
- f->file_creation_time, f->epoch_number,
646
- f->file_checksum, f->file_checksum_func_name,
647
- f->unique_id, f->compensated_range_deletion_size,
648
- f->tail_size, f->user_defined_timestamps_persisted);
649
- ROCKS_LOG_WARN(immutable_db_options_.info_log,
650
- "[%s] Moving #%" PRIu64
651
- " from from_level-%d to from_level-%d %" PRIu64
652
- " bytes\n",
653
- cfd->GetName().c_str(), f->fd.GetNumber(),
654
- from_level, to_level, f->fd.GetFileSize());
655
- }
656
- recovery_ctx->UpdateVersionEdits(cfd, edit);
657
- }
658
- --to_level;
659
- }
660
- }
661
- }
662
- }
663
- s = SetupDBId(write_options, read_only, recovery_ctx);
664
- ROCKS_LOG_INFO(immutable_db_options_.info_log, "DB ID: %s\n", db_id_.c_str());
665
- if (s.ok() && !read_only) {
666
- s = MaybeUpdateNextFileNumber(recovery_ctx);
667
- }
668
-
669
- if (immutable_db_options_.paranoid_checks && s.ok()) {
670
- s = CheckConsistency();
671
- }
672
- if (s.ok() && !read_only) {
673
- // TODO: share file descriptors (FSDirectory) with SetDirectories above
674
- std::map<std::string, std::shared_ptr<FSDirectory>> created_dirs;
675
- for (auto cfd : *versions_->GetColumnFamilySet()) {
676
- s = cfd->AddDirectories(&created_dirs);
677
- if (!s.ok()) {
678
- return s;
679
- }
680
- }
681
- }
682
-
683
- std::vector<std::string> files_in_wal_dir;
684
- if (s.ok()) {
685
- // Initial max_total_in_memory_state_ before recovery wals. Log recovery
686
- // may check this value to decide whether to flush.
687
- max_total_in_memory_state_ = 0;
688
- for (auto cfd : *versions_->GetColumnFamilySet()) {
689
- auto* mutable_cf_options = cfd->GetLatestMutableCFOptions();
690
- max_total_in_memory_state_ += mutable_cf_options->write_buffer_size *
691
- mutable_cf_options->max_write_buffer_number;
692
- }
693
-
694
- SequenceNumber next_sequence(kMaxSequenceNumber);
695
- default_cf_handle_ = new ColumnFamilyHandleImpl(
696
- versions_->GetColumnFamilySet()->GetDefault(), this, &mutex_);
697
- default_cf_internal_stats_ = default_cf_handle_->cfd()->internal_stats();
698
-
699
- // Recover from all newer log files than the ones named in the
700
- // descriptor (new log files may have been added by the previous
701
- // incarnation without registering them in the descriptor).
702
- //
703
- // Note that prev_log_number() is no longer used, but we pay
704
- // attention to it in case we are recovering a database
705
- // produced by an older version of rocksdb.
706
- auto wal_dir = immutable_db_options_.GetWalDir();
707
- if (!immutable_db_options_.best_efforts_recovery) {
708
- IOOptions io_opts;
709
- io_opts.do_not_recurse = true;
710
- s = immutable_db_options_.fs->GetChildren(
711
- wal_dir, io_opts, &files_in_wal_dir, /*IODebugContext*=*/nullptr);
712
- }
713
- if (s.IsNotFound()) {
714
- return Status::InvalidArgument("wal_dir not found", wal_dir);
715
- } else if (!s.ok()) {
716
- return s;
717
- }
718
-
719
- std::unordered_map<uint64_t, std::string> wal_files;
720
- for (const auto& file : files_in_wal_dir) {
721
- uint64_t number;
722
- FileType type;
723
- if (ParseFileName(file, &number, &type) && type == kWalFile) {
724
- if (is_new_db) {
725
- return Status::Corruption(
726
- "While creating a new Db, wal_dir contains "
727
- "existing log file: ",
728
- file);
729
- } else {
730
- wal_files[number] = LogFileName(wal_dir, number);
731
- }
732
- }
733
- }
734
-
735
- if (immutable_db_options_.track_and_verify_wals_in_manifest) {
736
- if (!immutable_db_options_.best_efforts_recovery) {
737
- // Verify WALs in MANIFEST.
738
- s = versions_->GetWalSet().CheckWals(env_, wal_files);
739
- } // else since best effort recovery does not recover from WALs, no need
740
- // to check WALs.
741
- } else if (!versions_->GetWalSet().GetWals().empty()) {
742
- // Tracking is disabled, clear previously tracked WALs from MANIFEST,
743
- // otherwise, in the future, if WAL tracking is enabled again,
744
- // since the WALs deleted when WAL tracking is disabled are not persisted
745
- // into MANIFEST, WAL check may fail.
746
- VersionEdit edit;
747
- WalNumber max_wal_number =
748
- versions_->GetWalSet().GetWals().rbegin()->first;
749
- edit.DeleteWalsBefore(max_wal_number + 1);
750
- assert(recovery_ctx != nullptr);
751
- assert(versions_->GetColumnFamilySet() != nullptr);
752
- recovery_ctx->UpdateVersionEdits(
753
- versions_->GetColumnFamilySet()->GetDefault(), edit);
754
- }
755
- if (!s.ok()) {
756
- return s;
757
- }
758
-
759
- if (!wal_files.empty()) {
760
- if (error_if_wal_file_exists) {
761
- return Status::Corruption(
762
- "The db was opened in readonly mode with error_if_wal_file_exists"
763
- "flag but a WAL file already exists");
764
- } else if (error_if_data_exists_in_wals) {
765
- for (auto& wal_file : wal_files) {
766
- uint64_t bytes;
767
- s = env_->GetFileSize(wal_file.second, &bytes);
768
- if (s.ok()) {
769
- if (bytes > 0) {
770
- return Status::Corruption(
771
- "error_if_data_exists_in_wals is set but there are data "
772
- " in WAL files.");
773
- }
774
- }
775
- }
776
- }
777
- }
778
-
779
- if (!wal_files.empty()) {
780
- // Recover in the order in which the wals were generated
781
- std::vector<uint64_t> wals;
782
- wals.reserve(wal_files.size());
783
- for (const auto& wal_file : wal_files) {
784
- wals.push_back(wal_file.first);
785
- }
786
- std::sort(wals.begin(), wals.end());
787
-
788
- bool corrupted_wal_found = false;
789
- s = RecoverLogFiles(wals, &next_sequence, read_only, is_retry,
790
- &corrupted_wal_found, recovery_ctx);
791
- if (corrupted_wal_found && recovered_seq != nullptr) {
792
- *recovered_seq = next_sequence;
793
- }
794
- if (!s.ok()) {
795
- // Clear memtables if recovery failed
796
- for (auto cfd : *versions_->GetColumnFamilySet()) {
797
- cfd->CreateNewMemtable(*cfd->GetLatestMutableCFOptions(),
798
- kMaxSequenceNumber);
799
- }
800
- }
801
- }
802
- }
803
-
804
- if (read_only) {
805
- // If we are opening as read-only, we need to update options_file_number_
806
- // to reflect the most recent OPTIONS file. It does not matter for regular
807
- // read-write db instance because options_file_number_ will later be
808
- // updated to versions_->NewFileNumber() in RenameTempFileToOptionsFile.
809
- std::vector<std::string> filenames;
810
- if (s.ok()) {
811
- const std::string normalized_dbname = NormalizePath(dbname_);
812
- const std::string normalized_wal_dir =
813
- NormalizePath(immutable_db_options_.GetWalDir());
814
- if (immutable_db_options_.best_efforts_recovery) {
815
- filenames = std::move(files_in_dbname);
816
- } else if (normalized_dbname == normalized_wal_dir) {
817
- filenames = std::move(files_in_wal_dir);
818
- } else {
819
- IOOptions io_opts;
820
- io_opts.do_not_recurse = true;
821
- s = immutable_db_options_.fs->GetChildren(
822
- GetName(), io_opts, &filenames, /*IODebugContext*=*/nullptr);
823
- }
824
- }
825
- if (s.ok()) {
826
- uint64_t number = 0;
827
- uint64_t options_file_number = 0;
828
- FileType type;
829
- for (const auto& fname : filenames) {
830
- if (ParseFileName(fname, &number, &type) && type == kOptionsFile) {
831
- options_file_number = std::max(number, options_file_number);
832
- }
833
- }
834
- versions_->options_file_number_ = options_file_number;
835
- uint64_t options_file_size = 0;
836
- if (options_file_number > 0) {
837
- s = env_->GetFileSize(OptionsFileName(GetName(), options_file_number),
838
- &options_file_size);
839
- }
840
- versions_->options_file_size_ = options_file_size;
841
- }
842
- }
843
- return s;
844
- }
845
-
846
- Status DBImpl::PersistentStatsProcessFormatVersion() {
847
- mutex_.AssertHeld();
848
- Status s;
849
- // persist version when stats CF doesn't exist
850
- bool should_persist_format_version = !persistent_stats_cfd_exists_;
851
- mutex_.Unlock();
852
- if (persistent_stats_cfd_exists_) {
853
- // Check persistent stats format version compatibility. Drop and recreate
854
- // persistent stats CF if format version is incompatible
855
- uint64_t format_version_recovered = 0;
856
- Status s_format = DecodePersistentStatsVersionNumber(
857
- this, StatsVersionKeyType::kFormatVersion, &format_version_recovered);
858
- uint64_t compatible_version_recovered = 0;
859
- Status s_compatible = DecodePersistentStatsVersionNumber(
860
- this, StatsVersionKeyType::kCompatibleVersion,
861
- &compatible_version_recovered);
862
- // abort reading from existing stats CF if any of following is true:
863
- // 1. failed to read format version or compatible version from disk
864
- // 2. sst's format version is greater than current format version, meaning
865
- // this sst is encoded with a newer RocksDB release, and current compatible
866
- // version is below the sst's compatible version
867
- if (!s_format.ok() || !s_compatible.ok() ||
868
- (kStatsCFCurrentFormatVersion < format_version_recovered &&
869
- kStatsCFCompatibleFormatVersion < compatible_version_recovered)) {
870
- if (!s_format.ok() || !s_compatible.ok()) {
871
- ROCKS_LOG_WARN(
872
- immutable_db_options_.info_log,
873
- "Recreating persistent stats column family since reading "
874
- "persistent stats version key failed. Format key: %s, compatible "
875
- "key: %s",
876
- s_format.ToString().c_str(), s_compatible.ToString().c_str());
877
- } else {
878
- ROCKS_LOG_WARN(
879
- immutable_db_options_.info_log,
880
- "Recreating persistent stats column family due to corrupted or "
881
- "incompatible format version. Recovered format: %" PRIu64
882
- "; recovered format compatible since: %" PRIu64 "\n",
883
- format_version_recovered, compatible_version_recovered);
884
- }
885
- s = DropColumnFamily(persist_stats_cf_handle_);
886
- if (s.ok()) {
887
- s = DestroyColumnFamilyHandle(persist_stats_cf_handle_);
888
- }
889
- ColumnFamilyHandle* handle = nullptr;
890
- if (s.ok()) {
891
- ColumnFamilyOptions cfo;
892
- OptimizeForPersistentStats(&cfo);
893
- s = CreateColumnFamilyImpl(ReadOptions(Env::IOActivity::kDBOpen),
894
- WriteOptions(Env::IOActivity::kDBOpen), cfo,
895
- kPersistentStatsColumnFamilyName, &handle);
896
- }
897
- if (s.ok()) {
898
- persist_stats_cf_handle_ = static_cast<ColumnFamilyHandleImpl*>(handle);
899
- // should also persist version here because old stats CF is discarded
900
- should_persist_format_version = true;
901
- }
902
- }
903
- }
904
- if (should_persist_format_version) {
905
- // Persistent stats CF being created for the first time, need to write
906
- // format version key
907
- WriteBatch batch;
908
- if (s.ok()) {
909
- s = batch.Put(persist_stats_cf_handle_, kFormatVersionKeyString,
910
- std::to_string(kStatsCFCurrentFormatVersion));
911
- }
912
- if (s.ok()) {
913
- s = batch.Put(persist_stats_cf_handle_, kCompatibleVersionKeyString,
914
- std::to_string(kStatsCFCompatibleFormatVersion));
915
- }
916
- if (s.ok()) {
917
- // TODO: plumb Env::IOActivity, Env::IOPriority
918
- WriteOptions wo;
919
- wo.low_pri = true;
920
- wo.no_slowdown = true;
921
- wo.sync = false;
922
- s = Write(wo, &batch);
923
- }
924
- }
925
- mutex_.Lock();
926
- return s;
927
- }
928
-
929
- Status DBImpl::InitPersistStatsColumnFamily() {
930
- mutex_.AssertHeld();
931
- assert(!persist_stats_cf_handle_);
932
- ColumnFamilyData* persistent_stats_cfd =
933
- versions_->GetColumnFamilySet()->GetColumnFamily(
934
- kPersistentStatsColumnFamilyName);
935
- persistent_stats_cfd_exists_ = persistent_stats_cfd != nullptr;
936
-
937
- Status s;
938
- if (persistent_stats_cfd != nullptr) {
939
- // We are recovering from a DB which already contains persistent stats CF,
940
- // the CF is already created in VersionSet::ApplyOneVersionEdit, but
941
- // column family handle was not. Need to explicitly create handle here.
942
- persist_stats_cf_handle_ =
943
- new ColumnFamilyHandleImpl(persistent_stats_cfd, this, &mutex_);
944
- } else {
945
- mutex_.Unlock();
946
- ColumnFamilyHandle* handle = nullptr;
947
- ColumnFamilyOptions cfo;
948
- OptimizeForPersistentStats(&cfo);
949
- s = CreateColumnFamilyImpl(ReadOptions(Env::IOActivity::kDBOpen),
950
- WriteOptions(Env::IOActivity::kDBOpen), cfo,
951
- kPersistentStatsColumnFamilyName, &handle);
952
- persist_stats_cf_handle_ = static_cast<ColumnFamilyHandleImpl*>(handle);
953
- mutex_.Lock();
954
- }
955
- return s;
956
- }
957
-
958
- Status DBImpl::LogAndApplyForRecovery(const RecoveryContext& recovery_ctx) {
959
- mutex_.AssertHeld();
960
- assert(versions_->descriptor_log_ == nullptr);
961
- const ReadOptions read_options(Env::IOActivity::kDBOpen);
962
- const WriteOptions write_options(Env::IOActivity::kDBOpen);
963
-
964
- Status s = versions_->LogAndApply(recovery_ctx.cfds_,
965
- recovery_ctx.mutable_cf_opts_, read_options,
966
- write_options, recovery_ctx.edit_lists_,
967
- &mutex_, directories_.GetDbDir());
968
- return s;
969
- }
970
-
971
- void DBImpl::InvokeWalFilterIfNeededOnColumnFamilyToWalNumberMap() {
972
- if (immutable_db_options_.wal_filter == nullptr) {
973
- return;
974
- }
975
- assert(immutable_db_options_.wal_filter != nullptr);
976
- WalFilter& wal_filter = *(immutable_db_options_.wal_filter);
977
-
978
- std::map<std::string, uint32_t> cf_name_id_map;
979
- std::map<uint32_t, uint64_t> cf_lognumber_map;
980
- assert(versions_);
981
- assert(versions_->GetColumnFamilySet());
982
- for (auto cfd : *versions_->GetColumnFamilySet()) {
983
- assert(cfd);
984
- cf_name_id_map.insert(std::make_pair(cfd->GetName(), cfd->GetID()));
985
- cf_lognumber_map.insert(std::make_pair(cfd->GetID(), cfd->GetLogNumber()));
986
- }
987
-
988
- wal_filter.ColumnFamilyLogNumberMap(cf_lognumber_map, cf_name_id_map);
989
- }
990
-
991
- bool DBImpl::InvokeWalFilterIfNeededOnWalRecord(uint64_t wal_number,
992
- const std::string& wal_fname,
993
- log::Reader::Reporter& reporter,
994
- Status& status,
995
- bool& stop_replay,
996
- WriteBatch& batch) {
997
- if (immutable_db_options_.wal_filter == nullptr) {
998
- return true;
999
- }
1000
- assert(immutable_db_options_.wal_filter != nullptr);
1001
- WalFilter& wal_filter = *(immutable_db_options_.wal_filter);
1002
-
1003
- WriteBatch new_batch;
1004
- bool batch_changed = false;
1005
-
1006
- bool process_current_record = true;
1007
-
1008
- WalFilter::WalProcessingOption wal_processing_option =
1009
- wal_filter.LogRecordFound(wal_number, wal_fname, batch, &new_batch,
1010
- &batch_changed);
1011
-
1012
- switch (wal_processing_option) {
1013
- case WalFilter::WalProcessingOption::kContinueProcessing:
1014
- // do nothing, proceeed normally
1015
- break;
1016
- case WalFilter::WalProcessingOption::kIgnoreCurrentRecord:
1017
- // skip current record
1018
- process_current_record = false;
1019
- break;
1020
- case WalFilter::WalProcessingOption::kStopReplay:
1021
- // skip current record and stop replay
1022
- process_current_record = false;
1023
- stop_replay = true;
1024
- break;
1025
- case WalFilter::WalProcessingOption::kCorruptedRecord: {
1026
- status = Status::Corruption("Corruption reported by Wal Filter ",
1027
- wal_filter.Name());
1028
- MaybeIgnoreError(&status);
1029
- if (!status.ok()) {
1030
- process_current_record = false;
1031
- reporter.Corruption(batch.GetDataSize(), status);
1032
- }
1033
- break;
1034
- }
1035
- default: {
1036
- // logical error which should not happen. If RocksDB throws, we would
1037
- // just do `throw std::logic_error`.
1038
- assert(false);
1039
- status = Status::NotSupported(
1040
- "Unknown WalProcessingOption returned by Wal Filter ",
1041
- wal_filter.Name());
1042
- MaybeIgnoreError(&status);
1043
- if (!status.ok()) {
1044
- // Ignore the error with current record processing.
1045
- stop_replay = true;
1046
- }
1047
- break;
1048
- }
1049
- }
1050
-
1051
- if (!process_current_record) {
1052
- return false;
1053
- }
1054
-
1055
- if (batch_changed) {
1056
- // Make sure that the count in the new batch is
1057
- // within the orignal count.
1058
- int new_count = WriteBatchInternal::Count(&new_batch);
1059
- int original_count = WriteBatchInternal::Count(&batch);
1060
- if (new_count > original_count) {
1061
- ROCKS_LOG_FATAL(
1062
- immutable_db_options_.info_log,
1063
- "Recovering log #%" PRIu64
1064
- " mode %d log filter %s returned "
1065
- "more records (%d) than original (%d) which is not allowed. "
1066
- "Aborting recovery.",
1067
- wal_number, static_cast<int>(immutable_db_options_.wal_recovery_mode),
1068
- wal_filter.Name(), new_count, original_count);
1069
- status = Status::NotSupported(
1070
- "More than original # of records "
1071
- "returned by Wal Filter ",
1072
- wal_filter.Name());
1073
- return false;
1074
- }
1075
- // Set the same sequence number in the new_batch
1076
- // as the original batch.
1077
- WriteBatchInternal::SetSequence(&new_batch,
1078
- WriteBatchInternal::Sequence(&batch));
1079
- batch = new_batch;
1080
- }
1081
- return true;
1082
- }
1083
-
1084
- // REQUIRES: wal_numbers are sorted in ascending order
1085
- Status DBImpl::RecoverLogFiles(const std::vector<uint64_t>& wal_numbers,
1086
- SequenceNumber* next_sequence, bool read_only,
1087
- bool is_retry, bool* corrupted_wal_found,
1088
- RecoveryContext* recovery_ctx) {
1089
- struct LogReporter : public log::Reader::Reporter {
1090
- Env* env;
1091
- Logger* info_log;
1092
- const char* fname;
1093
- Status* status; // nullptr if immutable_db_options_.paranoid_checks==false
1094
- bool* old_log_record;
1095
- void Corruption(size_t bytes, const Status& s) override {
1096
- ROCKS_LOG_WARN(info_log, "%s%s: dropping %d bytes; %s",
1097
- (status == nullptr ? "(ignoring error) " : ""), fname,
1098
- static_cast<int>(bytes), s.ToString().c_str());
1099
- if (status != nullptr && status->ok()) {
1100
- *status = s;
1101
- }
1102
- }
1103
-
1104
- void OldLogRecord(size_t bytes) override {
1105
- if (old_log_record != nullptr) {
1106
- *old_log_record = true;
1107
- }
1108
- ROCKS_LOG_WARN(info_log, "%s: dropping %d bytes; possibly recycled",
1109
- fname, static_cast<int>(bytes));
1110
- }
1111
- };
1112
-
1113
- mutex_.AssertHeld();
1114
- Status status;
1115
- bool old_log_record = false;
1116
- std::unordered_map<int, VersionEdit> version_edits;
1117
- // no need to refcount because iteration is under mutex
1118
- for (auto cfd : *versions_->GetColumnFamilySet()) {
1119
- VersionEdit edit;
1120
- edit.SetColumnFamily(cfd->GetID());
1121
- version_edits.insert({cfd->GetID(), edit});
1122
- }
1123
- int job_id = next_job_id_.fetch_add(1);
1124
- {
1125
- auto stream = event_logger_.Log();
1126
- stream << "job" << job_id << "event"
1127
- << "recovery_started";
1128
- stream << "wal_files";
1129
- stream.StartArray();
1130
- for (auto wal_number : wal_numbers) {
1131
- stream << wal_number;
1132
- }
1133
- stream.EndArray();
1134
- }
1135
-
1136
- // No-op for immutable_db_options_.wal_filter == nullptr.
1137
- InvokeWalFilterIfNeededOnColumnFamilyToWalNumberMap();
1138
-
1139
- bool stop_replay_by_wal_filter = false;
1140
- bool stop_replay_for_corruption = false;
1141
- bool flushed = false;
1142
- uint64_t corrupted_wal_number = kMaxSequenceNumber;
1143
- uint64_t min_wal_number = MinLogNumberToKeep();
1144
- if (!allow_2pc()) {
1145
- // In non-2pc mode, we skip WALs that do not back unflushed data.
1146
- min_wal_number =
1147
- std::max(min_wal_number, versions_->MinLogNumberWithUnflushedData());
1148
- }
1149
- for (auto wal_number : wal_numbers) {
1150
- if (wal_number < min_wal_number) {
1151
- ROCKS_LOG_INFO(immutable_db_options_.info_log,
1152
- "Skipping log #%" PRIu64
1153
- " since it is older than min log to keep #%" PRIu64,
1154
- wal_number, min_wal_number);
1155
- continue;
1156
- }
1157
- // The previous incarnation may not have written any MANIFEST
1158
- // records after allocating this log number. So we manually
1159
- // update the file number allocation counter in VersionSet.
1160
- versions_->MarkFileNumberUsed(wal_number);
1161
- // Open the log file
1162
- std::string fname =
1163
- LogFileName(immutable_db_options_.GetWalDir(), wal_number);
1164
-
1165
- ROCKS_LOG_INFO(immutable_db_options_.info_log,
1166
- "Recovering log #%" PRIu64 " mode %d", wal_number,
1167
- static_cast<int>(immutable_db_options_.wal_recovery_mode));
1168
- auto logFileDropped = [this, &fname]() {
1169
- uint64_t bytes;
1170
- if (env_->GetFileSize(fname, &bytes).ok()) {
1171
- auto info_log = immutable_db_options_.info_log.get();
1172
- ROCKS_LOG_WARN(info_log, "%s: dropping %d bytes", fname.c_str(),
1173
- static_cast<int>(bytes));
1174
- }
1175
- };
1176
- if (stop_replay_by_wal_filter) {
1177
- logFileDropped();
1178
- continue;
1179
- }
1180
-
1181
- std::unique_ptr<SequentialFileReader> file_reader;
1182
- {
1183
- std::unique_ptr<FSSequentialFile> file;
1184
- status = fs_->NewSequentialFile(
1185
- fname, fs_->OptimizeForLogRead(file_options_), &file, nullptr);
1186
- if (!status.ok()) {
1187
- MaybeIgnoreError(&status);
1188
- if (!status.ok()) {
1189
- return status;
1190
- } else {
1191
- // Fail with one log file, but that's ok.
1192
- // Try next one.
1193
- continue;
1194
- }
1195
- }
1196
- file_reader.reset(new SequentialFileReader(
1197
- std::move(file), fname, immutable_db_options_.log_readahead_size,
1198
- io_tracer_, /*listeners=*/{}, /*rate_limiter=*/nullptr, is_retry));
1199
- }
1200
-
1201
- // Create the log reader.
1202
- LogReporter reporter;
1203
- reporter.env = env_;
1204
- reporter.info_log = immutable_db_options_.info_log.get();
1205
- reporter.fname = fname.c_str();
1206
- reporter.old_log_record = &old_log_record;
1207
- if (!immutable_db_options_.paranoid_checks ||
1208
- immutable_db_options_.wal_recovery_mode ==
1209
- WALRecoveryMode::kSkipAnyCorruptedRecords) {
1210
- reporter.status = nullptr;
1211
- } else {
1212
- reporter.status = &status;
1213
- }
1214
- // We intentially make log::Reader do checksumming even if
1215
- // paranoid_checks==false so that corruptions cause entire commits
1216
- // to be skipped instead of propagating bad information (like overly
1217
- // large sequence numbers).
1218
- log::Reader reader(immutable_db_options_.info_log, std::move(file_reader),
1219
- &reporter, true /*checksum*/, wal_number);
1220
-
1221
- // Determine if we should tolerate incomplete records at the tail end of the
1222
- // Read all the records and add to a memtable
1223
- std::string scratch;
1224
- Slice record;
1225
-
1226
- const UnorderedMap<uint32_t, size_t>& running_ts_sz =
1227
- versions_->GetRunningColumnFamiliesTimestampSize();
1228
-
1229
- TEST_SYNC_POINT_CALLBACK("DBImpl::RecoverLogFiles:BeforeReadWal",
1230
- /*arg=*/nullptr);
1231
- uint64_t record_checksum;
1232
- while (!stop_replay_by_wal_filter &&
1233
- reader.ReadRecord(&record, &scratch,
1234
- immutable_db_options_.wal_recovery_mode,
1235
- &record_checksum) &&
1236
- status.ok()) {
1237
- if (record.size() < WriteBatchInternal::kHeader) {
1238
- reporter.Corruption(record.size(),
1239
- Status::Corruption("log record too small"));
1240
- continue;
1241
- }
1242
- // We create a new batch and initialize with a valid prot_info_ to store
1243
- // the data checksums
1244
- WriteBatch batch;
1245
- std::unique_ptr<WriteBatch> new_batch;
1246
-
1247
- status = WriteBatchInternal::SetContents(&batch, record);
1248
- if (!status.ok()) {
1249
- return status;
1250
- }
1251
-
1252
- const UnorderedMap<uint32_t, size_t>& record_ts_sz =
1253
- reader.GetRecordedTimestampSize();
1254
- status = HandleWriteBatchTimestampSizeDifference(
1255
- &batch, running_ts_sz, record_ts_sz,
1256
- TimestampSizeConsistencyMode::kReconcileInconsistency, &new_batch);
1257
- if (!status.ok()) {
1258
- return status;
1259
- }
1260
-
1261
- bool batch_updated = new_batch != nullptr;
1262
- WriteBatch* batch_to_use = batch_updated ? new_batch.get() : &batch;
1263
- TEST_SYNC_POINT_CALLBACK(
1264
- "DBImpl::RecoverLogFiles:BeforeUpdateProtectionInfo:batch",
1265
- batch_to_use);
1266
- TEST_SYNC_POINT_CALLBACK(
1267
- "DBImpl::RecoverLogFiles:BeforeUpdateProtectionInfo:checksum",
1268
- &record_checksum);
1269
- status = WriteBatchInternal::UpdateProtectionInfo(
1270
- batch_to_use, 8 /* bytes_per_key */,
1271
- batch_updated ? nullptr : &record_checksum);
1272
- if (!status.ok()) {
1273
- return status;
1274
- }
1275
-
1276
- SequenceNumber sequence = WriteBatchInternal::Sequence(batch_to_use);
1277
- if (sequence > kMaxSequenceNumber) {
1278
- reporter.Corruption(
1279
- record.size(),
1280
- Status::Corruption("sequence " + std::to_string(sequence) +
1281
- " is too large"));
1282
- continue;
1283
- }
1284
-
1285
- if (immutable_db_options_.wal_recovery_mode ==
1286
- WALRecoveryMode::kPointInTimeRecovery) {
1287
- // In point-in-time recovery mode, if sequence id of log files are
1288
- // consecutive, we continue recovery despite corruption. This could
1289
- // happen when we open and write to a corrupted DB, where sequence id
1290
- // will start from the last sequence id we recovered.
1291
- if (sequence == *next_sequence) {
1292
- stop_replay_for_corruption = false;
1293
- }
1294
- if (stop_replay_for_corruption) {
1295
- logFileDropped();
1296
- break;
1297
- }
1298
- }
1299
-
1300
- // For the default case of wal_filter == nullptr, always performs no-op
1301
- // and returns true.
1302
- if (!InvokeWalFilterIfNeededOnWalRecord(wal_number, fname, reporter,
1303
- status, stop_replay_by_wal_filter,
1304
- *batch_to_use)) {
1305
- continue;
1306
- }
1307
-
1308
- // If column family was not found, it might mean that the WAL write
1309
- // batch references to the column family that was dropped after the
1310
- // insert. We don't want to fail the whole write batch in that case --
1311
- // we just ignore the update.
1312
- // That's why we set ignore missing column families to true
1313
- bool has_valid_writes = false;
1314
- status = WriteBatchInternal::InsertInto(
1315
- batch_to_use, column_family_memtables_.get(), &flush_scheduler_,
1316
- &trim_history_scheduler_, true, wal_number, this,
1317
- false /* concurrent_memtable_writes */, next_sequence,
1318
- &has_valid_writes, seq_per_batch_, batch_per_txn_);
1319
- MaybeIgnoreError(&status);
1320
- if (!status.ok()) {
1321
- // We are treating this as a failure while reading since we read valid
1322
- // blocks that do not form coherent data
1323
- reporter.Corruption(record.size(), status);
1324
- continue;
1325
- }
1326
-
1327
- if (has_valid_writes && !read_only) {
1328
- // we can do this because this is called before client has access to the
1329
- // DB and there is only a single thread operating on DB
1330
- ColumnFamilyData* cfd;
1331
-
1332
- while ((cfd = flush_scheduler_.TakeNextColumnFamily()) != nullptr) {
1333
- cfd->UnrefAndTryDelete();
1334
- // If this asserts, it means that InsertInto failed in
1335
- // filtering updates to already-flushed column families
1336
- assert(cfd->GetLogNumber() <= wal_number);
1337
- auto iter = version_edits.find(cfd->GetID());
1338
- assert(iter != version_edits.end());
1339
- VersionEdit* edit = &iter->second;
1340
- status = WriteLevel0TableForRecovery(job_id, cfd, cfd->mem(), edit);
1341
- if (!status.ok()) {
1342
- // Reflect errors immediately so that conditions like full
1343
- // file-systems cause the DB::Open() to fail.
1344
- return status;
1345
- }
1346
- flushed = true;
1347
-
1348
- cfd->CreateNewMemtable(*cfd->GetLatestMutableCFOptions(),
1349
- *next_sequence - 1);
1350
- }
1351
- }
1352
- }
1353
-
1354
- if (!status.ok() || old_log_record) {
1355
- if (status.IsNotSupported()) {
1356
- // We should not treat NotSupported as corruption. It is rather a clear
1357
- // sign that we are processing a WAL that is produced by an incompatible
1358
- // version of the code.
1359
- return status;
1360
- }
1361
- if (immutable_db_options_.wal_recovery_mode ==
1362
- WALRecoveryMode::kSkipAnyCorruptedRecords) {
1363
- // We should ignore all errors unconditionally
1364
- status = Status::OK();
1365
- } else if (immutable_db_options_.wal_recovery_mode ==
1366
- WALRecoveryMode::kPointInTimeRecovery) {
1367
- if (status.IsIOError()) {
1368
- ROCKS_LOG_ERROR(immutable_db_options_.info_log,
1369
- "IOError during point-in-time reading log #%" PRIu64
1370
- " seq #%" PRIu64
1371
- ". %s. This likely mean loss of synced WAL, "
1372
- "thus recovery fails.",
1373
- wal_number, *next_sequence,
1374
- status.ToString().c_str());
1375
- return status;
1376
- }
1377
- // We should ignore the error but not continue replaying
1378
- status = Status::OK();
1379
- old_log_record = false;
1380
- stop_replay_for_corruption = true;
1381
- corrupted_wal_number = wal_number;
1382
- if (corrupted_wal_found != nullptr) {
1383
- *corrupted_wal_found = true;
1384
- }
1385
- ROCKS_LOG_INFO(immutable_db_options_.info_log,
1386
- "Point in time recovered to log #%" PRIu64
1387
- " seq #%" PRIu64,
1388
- wal_number, *next_sequence);
1389
- } else {
1390
- assert(immutable_db_options_.wal_recovery_mode ==
1391
- WALRecoveryMode::kTolerateCorruptedTailRecords ||
1392
- immutable_db_options_.wal_recovery_mode ==
1393
- WALRecoveryMode::kAbsoluteConsistency);
1394
- return status;
1395
- }
1396
- }
1397
-
1398
- flush_scheduler_.Clear();
1399
- trim_history_scheduler_.Clear();
1400
- auto last_sequence = *next_sequence - 1;
1401
- if ((*next_sequence != kMaxSequenceNumber) &&
1402
- (versions_->LastSequence() <= last_sequence)) {
1403
- versions_->SetLastAllocatedSequence(last_sequence);
1404
- versions_->SetLastPublishedSequence(last_sequence);
1405
- versions_->SetLastSequence(last_sequence);
1406
- }
1407
- }
1408
- // Compare the corrupted log number to all columnfamily's current log number.
1409
- // Abort Open() if any column family's log number is greater than
1410
- // the corrupted log number, which means CF contains data beyond the point of
1411
- // corruption. This could during PIT recovery when the WAL is corrupted and
1412
- // some (but not all) CFs are flushed
1413
- // Exclude the PIT case where no log is dropped after the corruption point.
1414
- // This is to cover the case for empty wals after corrupted log, in which we
1415
- // don't reset stop_replay_for_corruption.
1416
- if (stop_replay_for_corruption == true &&
1417
- (immutable_db_options_.wal_recovery_mode ==
1418
- WALRecoveryMode::kPointInTimeRecovery ||
1419
- immutable_db_options_.wal_recovery_mode ==
1420
- WALRecoveryMode::kTolerateCorruptedTailRecords)) {
1421
- for (auto cfd : *versions_->GetColumnFamilySet()) {
1422
- // One special case cause cfd->GetLogNumber() > corrupted_wal_number but
1423
- // the CF is still consistent: If a new column family is created during
1424
- // the flush and the WAL sync fails at the same time, the new CF points to
1425
- // the new WAL but the old WAL is curropted. Since the new CF is empty, it
1426
- // is still consistent. We add the check of CF sst file size to avoid the
1427
- // false positive alert.
1428
-
1429
- // Note that, the check of (cfd->GetLiveSstFilesSize() > 0) may leads to
1430
- // the ignorance of a very rare inconsistency case caused in data
1431
- // canclation. One CF is empty due to KV deletion. But those operations
1432
- // are in the WAL. If the WAL is corrupted, the status of this CF might
1433
- // not be consistent with others. However, the consistency check will be
1434
- // bypassed due to empty CF.
1435
- // TODO: a better and complete implementation is needed to ensure strict
1436
- // consistency check in WAL recovery including hanlding the tailing
1437
- // issues.
1438
- if (cfd->GetLogNumber() > corrupted_wal_number &&
1439
- cfd->GetLiveSstFilesSize() > 0) {
1440
- ROCKS_LOG_ERROR(immutable_db_options_.info_log,
1441
- "Column family inconsistency: SST file contains data"
1442
- " beyond the point of corruption.");
1443
- return Status::Corruption("SST file is ahead of WALs in CF " +
1444
- cfd->GetName());
1445
- }
1446
- }
1447
- }
1448
-
1449
- // True if there's any data in the WALs; if not, we can skip re-processing
1450
- // them later
1451
- bool data_seen = false;
1452
- if (!read_only) {
1453
- // no need to refcount since client still doesn't have access
1454
- // to the DB and can not drop column families while we iterate
1455
- const WalNumber max_wal_number = wal_numbers.back();
1456
- for (auto cfd : *versions_->GetColumnFamilySet()) {
1457
- auto iter = version_edits.find(cfd->GetID());
1458
- assert(iter != version_edits.end());
1459
- VersionEdit* edit = &iter->second;
1460
-
1461
- if (cfd->GetLogNumber() > max_wal_number) {
1462
- // Column family cfd has already flushed the data
1463
- // from all wals. Memtable has to be empty because
1464
- // we filter the updates based on wal_number
1465
- // (in WriteBatch::InsertInto)
1466
- assert(cfd->mem()->GetFirstSequenceNumber() == 0);
1467
- assert(edit->NumEntries() == 0);
1468
- continue;
1469
- }
1470
-
1471
- TEST_SYNC_POINT_CALLBACK(
1472
- "DBImpl::RecoverLogFiles:BeforeFlushFinalMemtable", /*arg=*/nullptr);
1473
-
1474
- // flush the final memtable (if non-empty)
1475
- if (cfd->mem()->GetFirstSequenceNumber() != 0) {
1476
- // If flush happened in the middle of recovery (e.g. due to memtable
1477
- // being full), we flush at the end. Otherwise we'll need to record
1478
- // where we were on last flush, which make the logic complicated.
1479
- if (flushed || !immutable_db_options_.avoid_flush_during_recovery) {
1480
- status = WriteLevel0TableForRecovery(job_id, cfd, cfd->mem(), edit);
1481
- if (!status.ok()) {
1482
- // Recovery failed
1483
- break;
1484
- }
1485
- flushed = true;
1486
-
1487
- cfd->CreateNewMemtable(*cfd->GetLatestMutableCFOptions(),
1488
- versions_->LastSequence());
1489
- }
1490
- data_seen = true;
1491
- }
1492
-
1493
- // Update the log number info in the version edit corresponding to this
1494
- // column family. Note that the version edits will be written to MANIFEST
1495
- // together later.
1496
- // writing wal_number in the manifest means that any log file
1497
- // with number strongly less than (wal_number + 1) is already
1498
- // recovered and should be ignored on next reincarnation.
1499
- // Since we already recovered max_wal_number, we want all wals
1500
- // with numbers `<= max_wal_number` (includes this one) to be ignored
1501
- if (flushed || cfd->mem()->GetFirstSequenceNumber() == 0) {
1502
- edit->SetLogNumber(max_wal_number + 1);
1503
- }
1504
- }
1505
- if (status.ok()) {
1506
- // we must mark the next log number as used, even though it's
1507
- // not actually used. that is because VersionSet assumes
1508
- // VersionSet::next_file_number_ always to be strictly greater than any
1509
- // log number
1510
- versions_->MarkFileNumberUsed(max_wal_number + 1);
1511
- assert(recovery_ctx != nullptr);
1512
-
1513
- for (auto* cfd : *versions_->GetColumnFamilySet()) {
1514
- auto iter = version_edits.find(cfd->GetID());
1515
- assert(iter != version_edits.end());
1516
- recovery_ctx->UpdateVersionEdits(cfd, iter->second);
1517
- }
1518
-
1519
- if (flushed || !data_seen) {
1520
- VersionEdit wal_deletion;
1521
- if (immutable_db_options_.track_and_verify_wals_in_manifest) {
1522
- wal_deletion.DeleteWalsBefore(max_wal_number + 1);
1523
- }
1524
- if (!allow_2pc()) {
1525
- // In non-2pc mode, flushing the memtables of the column families
1526
- // means we can advance min_log_number_to_keep.
1527
- wal_deletion.SetMinLogNumberToKeep(max_wal_number + 1);
1528
- }
1529
- assert(versions_->GetColumnFamilySet() != nullptr);
1530
- recovery_ctx->UpdateVersionEdits(
1531
- versions_->GetColumnFamilySet()->GetDefault(), wal_deletion);
1532
- }
1533
- }
1534
- }
1535
-
1536
- if (status.ok()) {
1537
- if (data_seen && !flushed) {
1538
- status = RestoreAliveLogFiles(wal_numbers);
1539
- } else if (!wal_numbers.empty()) { // If there's no data in the WAL, or we
1540
- // flushed all the data, still
1541
- // truncate the log file. If the process goes into a crash loop before
1542
- // the file is deleted, the preallocated space will never get freed.
1543
- const bool truncate = !read_only;
1544
- GetLogSizeAndMaybeTruncate(wal_numbers.back(), truncate, nullptr)
1545
- .PermitUncheckedError();
1546
- }
1547
- }
1548
-
1549
- event_logger_.Log() << "job" << job_id << "event"
1550
- << "recovery_finished";
1551
-
1552
- return status;
1553
- }
1554
-
1555
- Status DBImpl::GetLogSizeAndMaybeTruncate(uint64_t wal_number, bool truncate,
1556
- LogFileNumberSize* log_ptr) {
1557
- LogFileNumberSize log(wal_number);
1558
- std::string fname =
1559
- LogFileName(immutable_db_options_.GetWalDir(), wal_number);
1560
- Status s;
1561
- // This gets the appear size of the wals, not including preallocated space.
1562
- s = env_->GetFileSize(fname, &log.size);
1563
- TEST_SYNC_POINT_CALLBACK("DBImpl::GetLogSizeAndMaybeTruncate:0", /*arg=*/&s);
1564
- if (s.ok() && truncate) {
1565
- std::unique_ptr<FSWritableFile> last_log;
1566
- Status truncate_status = fs_->ReopenWritableFile(
1567
- fname,
1568
- fs_->OptimizeForLogWrite(
1569
- file_options_,
1570
- BuildDBOptions(immutable_db_options_, mutable_db_options_)),
1571
- &last_log, nullptr);
1572
- if (truncate_status.ok()) {
1573
- truncate_status = last_log->Truncate(log.size, IOOptions(), nullptr);
1574
- }
1575
- if (truncate_status.ok()) {
1576
- truncate_status = last_log->Close(IOOptions(), nullptr);
1577
- }
1578
- // Not a critical error if fail to truncate.
1579
- if (!truncate_status.ok() && !truncate_status.IsNotSupported()) {
1580
- ROCKS_LOG_WARN(immutable_db_options_.info_log,
1581
- "Failed to truncate log #%" PRIu64 ": %s", wal_number,
1582
- truncate_status.ToString().c_str());
1583
- }
1584
- }
1585
- if (log_ptr) {
1586
- *log_ptr = log;
1587
- }
1588
- return s;
1589
- }
1590
-
1591
- Status DBImpl::RestoreAliveLogFiles(const std::vector<uint64_t>& wal_numbers) {
1592
- if (wal_numbers.empty()) {
1593
- return Status::OK();
1594
- }
1595
- Status s;
1596
- mutex_.AssertHeld();
1597
- assert(immutable_db_options_.avoid_flush_during_recovery);
1598
- // Mark these as alive so they'll be considered for deletion later by
1599
- // FindObsoleteFiles()
1600
- total_log_size_ = 0;
1601
- log_empty_ = false;
1602
- uint64_t min_wal_with_unflushed_data =
1603
- versions_->MinLogNumberWithUnflushedData();
1604
- for (auto wal_number : wal_numbers) {
1605
- if (!allow_2pc() && wal_number < min_wal_with_unflushed_data) {
1606
- // In non-2pc mode, the WAL files not backing unflushed data are not
1607
- // alive, thus should not be added to the alive_log_files_.
1608
- continue;
1609
- }
1610
- // We preallocate space for wals, but then after a crash and restart, those
1611
- // preallocated space are not needed anymore. It is likely only the last
1612
- // log has such preallocated space, so we only truncate for the last log.
1613
- LogFileNumberSize log;
1614
- s = GetLogSizeAndMaybeTruncate(
1615
- wal_number, /*truncate=*/(wal_number == wal_numbers.back()), &log);
1616
- if (!s.ok()) {
1617
- break;
1618
- }
1619
- total_log_size_ += log.size;
1620
- alive_log_files_.push_back(log);
1621
- }
1622
- return s;
1623
- }
1624
-
1625
- Status DBImpl::WriteLevel0TableForRecovery(int job_id, ColumnFamilyData* cfd,
1626
- MemTable* mem, VersionEdit* edit) {
1627
- mutex_.AssertHeld();
1628
- assert(cfd);
1629
- assert(cfd->imm());
1630
- // The immutable memtable list must be empty.
1631
- assert(std::numeric_limits<uint64_t>::max() ==
1632
- cfd->imm()->GetEarliestMemTableID());
1633
-
1634
- const uint64_t start_micros = immutable_db_options_.clock->NowMicros();
1635
-
1636
- FileMetaData meta;
1637
- std::vector<BlobFileAddition> blob_file_additions;
1638
-
1639
- std::unique_ptr<std::list<uint64_t>::iterator> pending_outputs_inserted_elem(
1640
- new std::list<uint64_t>::iterator(
1641
- CaptureCurrentFileNumberInPendingOutputs()));
1642
- meta.fd = FileDescriptor(versions_->NewFileNumber(), 0, 0);
1643
- ReadOptions ro;
1644
- ro.total_order_seek = true;
1645
- ro.io_activity = Env::IOActivity::kDBOpen;
1646
- Arena arena;
1647
- Status s;
1648
- TableProperties table_properties;
1649
- {
1650
- ScopedArenaPtr<InternalIterator> iter(
1651
- mem->NewIterator(ro, /*seqno_to_time_mapping=*/nullptr, &arena));
1652
- ROCKS_LOG_DEBUG(immutable_db_options_.info_log,
1653
- "[%s] [WriteLevel0TableForRecovery]"
1654
- " Level-0 table #%" PRIu64 ": started",
1655
- cfd->GetName().c_str(), meta.fd.GetNumber());
1656
-
1657
- // Get the latest mutable cf options while the mutex is still locked
1658
- const MutableCFOptions mutable_cf_options =
1659
- *cfd->GetLatestMutableCFOptions();
1660
- bool paranoid_file_checks =
1661
- cfd->GetLatestMutableCFOptions()->paranoid_file_checks;
1662
-
1663
- int64_t _current_time = 0;
1664
- immutable_db_options_.clock->GetCurrentTime(&_current_time)
1665
- .PermitUncheckedError(); // ignore error
1666
- const uint64_t current_time = static_cast<uint64_t>(_current_time);
1667
- meta.oldest_ancester_time = current_time;
1668
- meta.epoch_number = cfd->NewEpochNumber();
1669
- {
1670
- auto write_hint = cfd->CalculateSSTWriteHint(0);
1671
- mutex_.Unlock();
1672
-
1673
- SequenceNumber earliest_write_conflict_snapshot;
1674
- std::vector<SequenceNumber> snapshot_seqs =
1675
- snapshots_.GetAll(&earliest_write_conflict_snapshot);
1676
- SequenceNumber earliest_snapshot =
1677
- (snapshot_seqs.empty() ? kMaxSequenceNumber : snapshot_seqs.at(0));
1678
- auto snapshot_checker = snapshot_checker_.get();
1679
- if (use_custom_gc_ && snapshot_checker == nullptr) {
1680
- snapshot_checker = DisableGCSnapshotChecker::Instance();
1681
- }
1682
- std::vector<std::unique_ptr<FragmentedRangeTombstoneIterator>>
1683
- range_del_iters;
1684
- auto range_del_iter =
1685
- // This is called during recovery, where a live memtable is flushed
1686
- // directly. In this case, no fragmented tombstone list is cached in
1687
- // this memtable yet.
1688
- mem->NewRangeTombstoneIterator(ro, kMaxSequenceNumber,
1689
- false /* immutable_memtable */);
1690
- if (range_del_iter != nullptr) {
1691
- range_del_iters.emplace_back(range_del_iter);
1692
- }
1693
-
1694
- IOStatus io_s;
1695
- const ReadOptions read_option(Env::IOActivity::kDBOpen);
1696
- const WriteOptions write_option(Env::IO_HIGH, Env::IOActivity::kDBOpen);
1697
-
1698
- TableBuilderOptions tboptions(
1699
- *cfd->ioptions(), mutable_cf_options, read_option, write_option,
1700
- cfd->internal_comparator(), cfd->internal_tbl_prop_coll_factories(),
1701
- GetCompressionFlush(*cfd->ioptions(), mutable_cf_options),
1702
- mutable_cf_options.compression_opts, cfd->GetID(), cfd->GetName(),
1703
- 0 /* level */, false /* is_bottommost */,
1704
- TableFileCreationReason::kRecovery, 0 /* oldest_key_time */,
1705
- 0 /* file_creation_time */, db_id_, db_session_id_,
1706
- 0 /* target_file_size */, meta.fd.GetNumber(), kMaxSequenceNumber);
1707
- Version* version = cfd->current();
1708
- version->Ref();
1709
- uint64_t num_input_entries = 0;
1710
- s = BuildTable(dbname_, versions_.get(), immutable_db_options_, tboptions,
1711
- file_options_for_compaction_, cfd->table_cache(),
1712
- iter.get(), std::move(range_del_iters), &meta,
1713
- &blob_file_additions, snapshot_seqs, earliest_snapshot,
1714
- earliest_write_conflict_snapshot, kMaxSequenceNumber,
1715
- snapshot_checker, paranoid_file_checks,
1716
- cfd->internal_stats(), &io_s, io_tracer_,
1717
- BlobFileCreationReason::kRecovery,
1718
- nullptr /* seqno_to_time_mapping */, &event_logger_,
1719
- job_id, nullptr /* table_properties */, write_hint,
1720
- nullptr /*full_history_ts_low*/, &blob_callback_, version,
1721
- &num_input_entries);
1722
- version->Unref();
1723
- LogFlush(immutable_db_options_.info_log);
1724
- ROCKS_LOG_DEBUG(immutable_db_options_.info_log,
1725
- "[%s] [WriteLevel0TableForRecovery]"
1726
- " Level-0 table #%" PRIu64 ": %" PRIu64 " bytes %s",
1727
- cfd->GetName().c_str(), meta.fd.GetNumber(),
1728
- meta.fd.GetFileSize(), s.ToString().c_str());
1729
- mutex_.Lock();
1730
-
1731
- // TODO(AR) is this ok?
1732
- if (!io_s.ok() && s.ok()) {
1733
- s = io_s;
1734
- }
1735
-
1736
- uint64_t total_num_entries = mem->num_entries();
1737
- if (s.ok() && total_num_entries != num_input_entries) {
1738
- std::string msg = "Expected " + std::to_string(total_num_entries) +
1739
- " entries in memtable, but read " +
1740
- std::to_string(num_input_entries);
1741
- ROCKS_LOG_WARN(immutable_db_options_.info_log,
1742
- "[%s] [JOB %d] Level-0 flush during recover: %s",
1743
- cfd->GetName().c_str(), job_id, msg.c_str());
1744
- if (immutable_db_options_.flush_verify_memtable_count) {
1745
- s = Status::Corruption(msg);
1746
- }
1747
- }
1748
- }
1749
- }
1750
- ReleaseFileNumberFromPendingOutputs(pending_outputs_inserted_elem);
1751
-
1752
- // Note that if file_size is zero, the file has been deleted and
1753
- // should not be added to the manifest.
1754
- const bool has_output = meta.fd.GetFileSize() > 0;
1755
-
1756
- constexpr int level = 0;
1757
-
1758
- if (s.ok() && has_output) {
1759
- edit->AddFile(level, meta.fd.GetNumber(), meta.fd.GetPathId(),
1760
- meta.fd.GetFileSize(), meta.smallest, meta.largest,
1761
- meta.fd.smallest_seqno, meta.fd.largest_seqno,
1762
- meta.marked_for_compaction, meta.temperature,
1763
- meta.oldest_blob_file_number, meta.oldest_ancester_time,
1764
- meta.file_creation_time, meta.epoch_number,
1765
- meta.file_checksum, meta.file_checksum_func_name,
1766
- meta.unique_id, meta.compensated_range_deletion_size,
1767
- meta.tail_size, meta.user_defined_timestamps_persisted);
1768
-
1769
- for (const auto& blob : blob_file_additions) {
1770
- edit->AddBlobFile(blob);
1771
- }
1772
-
1773
- // For UDT in memtable only feature, move up the cutoff timestamp whenever
1774
- // a flush happens.
1775
- const Comparator* ucmp = cfd->user_comparator();
1776
- size_t ts_sz = ucmp->timestamp_size();
1777
- if (ts_sz > 0 && !cfd->ioptions()->persist_user_defined_timestamps) {
1778
- Slice mem_newest_udt = mem->GetNewestUDT();
1779
- std::string full_history_ts_low = cfd->GetFullHistoryTsLow();
1780
- if (full_history_ts_low.empty() ||
1781
- ucmp->CompareTimestamp(mem_newest_udt, full_history_ts_low) >= 0) {
1782
- std::string new_full_history_ts_low;
1783
- GetFullHistoryTsLowFromU64CutoffTs(&mem_newest_udt,
1784
- &new_full_history_ts_low);
1785
- edit->SetFullHistoryTsLow(new_full_history_ts_low);
1786
- }
1787
- }
1788
- }
1789
-
1790
- InternalStats::CompactionStats stats(CompactionReason::kFlush, 1);
1791
- stats.micros = immutable_db_options_.clock->NowMicros() - start_micros;
1792
-
1793
- if (has_output) {
1794
- stats.bytes_written = meta.fd.GetFileSize();
1795
- stats.num_output_files = 1;
1796
- }
1797
-
1798
- const auto& blobs = edit->GetBlobFileAdditions();
1799
- for (const auto& blob : blobs) {
1800
- stats.bytes_written_blob += blob.GetTotalBlobBytes();
1801
- }
1802
-
1803
- stats.num_output_files_blob = static_cast<int>(blobs.size());
1804
-
1805
- cfd->internal_stats()->AddCompactionStats(level, Env::Priority::USER, stats);
1806
- cfd->internal_stats()->AddCFStats(
1807
- InternalStats::BYTES_FLUSHED,
1808
- stats.bytes_written + stats.bytes_written_blob);
1809
- RecordTick(stats_, COMPACT_WRITE_BYTES, meta.fd.GetFileSize());
1810
- return s;
1811
- }
1812
-
1813
- Status DB::Open(const Options& options, const std::string& dbname, DB** dbptr) {
1814
- DBOptions db_options(options);
1815
- ColumnFamilyOptions cf_options(options);
1816
- std::vector<ColumnFamilyDescriptor> column_families;
1817
- column_families.emplace_back(kDefaultColumnFamilyName, cf_options);
1818
- if (db_options.persist_stats_to_disk) {
1819
- column_families.emplace_back(kPersistentStatsColumnFamilyName, cf_options);
1820
- }
1821
- std::vector<ColumnFamilyHandle*> handles;
1822
- Status s = DB::Open(db_options, dbname, column_families, &handles, dbptr);
1823
- if (s.ok()) {
1824
- if (db_options.persist_stats_to_disk) {
1825
- assert(handles.size() == 2);
1826
- } else {
1827
- assert(handles.size() == 1);
1828
- }
1829
- // i can delete the handle since DBImpl is always holding a reference to
1830
- // default column family
1831
- if (db_options.persist_stats_to_disk && handles[1] != nullptr) {
1832
- delete handles[1];
1833
- }
1834
- delete handles[0];
1835
- }
1836
- return s;
1837
- }
1838
-
1839
- Status DB::Open(const DBOptions& db_options, const std::string& dbname,
1840
- const std::vector<ColumnFamilyDescriptor>& column_families,
1841
- std::vector<ColumnFamilyHandle*>* handles, DB** dbptr) {
1842
- const bool kSeqPerBatch = true;
1843
- const bool kBatchPerTxn = true;
1844
- ThreadStatusUtil::SetEnableTracking(db_options.enable_thread_tracking);
1845
- ThreadStatusUtil::SetThreadOperation(ThreadStatus::OperationType::OP_DBOPEN);
1846
- bool can_retry = false;
1847
- Status s;
1848
- do {
1849
- s = DBImpl::Open(db_options, dbname, column_families, handles, dbptr,
1850
- !kSeqPerBatch, kBatchPerTxn, can_retry, &can_retry);
1851
- } while (!s.ok() && can_retry);
1852
- ThreadStatusUtil::ResetThreadStatus();
1853
- return s;
1854
- }
1855
-
1856
- // TODO: Implement the trimming in flush code path.
1857
- // TODO: Perform trimming before inserting into memtable during recovery.
1858
- // TODO: Pick files with max_timestamp > trim_ts by each file's timestamp meta
1859
- // info, and handle only these files to reduce io.
1860
- Status DB::OpenAndTrimHistory(
1861
- const DBOptions& db_options, const std::string& dbname,
1862
- const std::vector<ColumnFamilyDescriptor>& column_families,
1863
- std::vector<ColumnFamilyHandle*>* handles, DB** dbptr,
1864
- std::string trim_ts) {
1865
- assert(dbptr != nullptr);
1866
- assert(handles != nullptr);
1867
- auto validate_options = [&db_options] {
1868
- if (db_options.avoid_flush_during_recovery) {
1869
- return Status::InvalidArgument(
1870
- "avoid_flush_during_recovery incompatible with "
1871
- "OpenAndTrimHistory");
1872
- }
1873
- return Status::OK();
1874
- };
1875
- auto s = validate_options();
1876
- if (!s.ok()) {
1877
- return s;
1878
- }
1879
-
1880
- DB* db = nullptr;
1881
- s = DB::Open(db_options, dbname, column_families, handles, &db);
1882
- if (!s.ok()) {
1883
- return s;
1884
- }
1885
- assert(db);
1886
- CompactRangeOptions options;
1887
- options.bottommost_level_compaction =
1888
- BottommostLevelCompaction::kForceOptimized;
1889
- auto db_impl = static_cast_with_check<DBImpl>(db);
1890
- for (auto handle : *handles) {
1891
- assert(handle != nullptr);
1892
- auto cfh = static_cast_with_check<ColumnFamilyHandleImpl>(handle);
1893
- auto cfd = cfh->cfd();
1894
- assert(cfd != nullptr);
1895
- // Only compact column families with timestamp enabled
1896
- if (cfd->user_comparator() != nullptr &&
1897
- cfd->user_comparator()->timestamp_size() > 0) {
1898
- s = db_impl->CompactRangeInternal(options, handle, nullptr, nullptr,
1899
- trim_ts);
1900
- if (!s.ok()) {
1901
- break;
1902
- }
1903
- }
1904
- }
1905
- auto clean_op = [&handles, &db] {
1906
- for (auto handle : *handles) {
1907
- auto temp_s = db->DestroyColumnFamilyHandle(handle);
1908
- assert(temp_s.ok());
1909
- }
1910
- handles->clear();
1911
- delete db;
1912
- };
1913
- if (!s.ok()) {
1914
- clean_op();
1915
- return s;
1916
- }
1917
-
1918
- *dbptr = db;
1919
- return s;
1920
- }
1921
-
1922
- IOStatus DBImpl::CreateWAL(const WriteOptions& write_options,
1923
- uint64_t log_file_num, uint64_t recycle_log_number,
1924
- size_t preallocate_block_size,
1925
- log::Writer** new_log) {
1926
- IOStatus io_s;
1927
- std::unique_ptr<FSWritableFile> lfile;
1928
-
1929
- DBOptions db_options =
1930
- BuildDBOptions(immutable_db_options_, mutable_db_options_);
1931
- FileOptions opt_file_options =
1932
- fs_->OptimizeForLogWrite(file_options_, db_options);
1933
- std::string wal_dir = immutable_db_options_.GetWalDir();
1934
- std::string log_fname = LogFileName(wal_dir, log_file_num);
1935
-
1936
- if (recycle_log_number) {
1937
- ROCKS_LOG_INFO(immutable_db_options_.info_log,
1938
- "reusing log %" PRIu64 " from recycle list\n",
1939
- recycle_log_number);
1940
- std::string old_log_fname = LogFileName(wal_dir, recycle_log_number);
1941
- TEST_SYNC_POINT("DBImpl::CreateWAL:BeforeReuseWritableFile1");
1942
- TEST_SYNC_POINT("DBImpl::CreateWAL:BeforeReuseWritableFile2");
1943
- io_s = fs_->ReuseWritableFile(log_fname, old_log_fname, opt_file_options,
1944
- &lfile, /*dbg=*/nullptr);
1945
- } else {
1946
- io_s = NewWritableFile(fs_.get(), log_fname, &lfile, opt_file_options);
1947
- }
1948
-
1949
- if (io_s.ok()) {
1950
- lfile->SetWriteLifeTimeHint(CalculateWALWriteHint());
1951
- lfile->SetPreallocationBlockSize(preallocate_block_size);
1952
-
1953
- const auto& listeners = immutable_db_options_.listeners;
1954
- FileTypeSet tmp_set = immutable_db_options_.checksum_handoff_file_types;
1955
- std::unique_ptr<WritableFileWriter> file_writer(new WritableFileWriter(
1956
- std::move(lfile), log_fname, opt_file_options,
1957
- immutable_db_options_.clock, io_tracer_, nullptr /* stats */,
1958
- Histograms::HISTOGRAM_ENUM_MAX /* hist_type */, listeners, nullptr,
1959
- tmp_set.Contains(FileType::kWalFile),
1960
- tmp_set.Contains(FileType::kWalFile)));
1961
- *new_log = new log::Writer(std::move(file_writer), log_file_num,
1962
- immutable_db_options_.recycle_log_file_num > 0,
1963
- immutable_db_options_.manual_wal_flush,
1964
- immutable_db_options_.wal_compression);
1965
- io_s = (*new_log)->AddCompressionTypeRecord(write_options);
1966
- }
1967
- return io_s;
1968
- }
1969
-
1970
- void DBImpl::TrackExistingDataFiles(
1971
- const std::vector<std::string>& existing_data_files) {
1972
- auto sfm = static_cast<SstFileManagerImpl*>(
1973
- immutable_db_options_.sst_file_manager.get());
1974
- assert(sfm);
1975
- std::vector<ColumnFamilyMetaData> metadata;
1976
- GetAllColumnFamilyMetaData(&metadata);
1977
-
1978
- std::unordered_set<std::string> referenced_files;
1979
- for (const auto& md : metadata) {
1980
- for (const auto& lmd : md.levels) {
1981
- for (const auto& fmd : lmd.files) {
1982
- // We're assuming that each sst file name exists in at most one of
1983
- // the paths.
1984
- std::string file_path =
1985
- fmd.directory + kFilePathSeparator + fmd.relative_filename;
1986
- sfm->OnAddFile(file_path, fmd.size).PermitUncheckedError();
1987
- referenced_files.insert(file_path);
1988
- }
1989
- }
1990
- for (const auto& bmd : md.blob_files) {
1991
- std::string name = bmd.blob_file_name;
1992
- // The BlobMetaData.blob_file_name may start with "/".
1993
- if (!name.empty() && name[0] == kFilePathSeparator) {
1994
- name = name.substr(1);
1995
- }
1996
- // We're assuming that each blob file name exists in at most one of
1997
- // the paths.
1998
- std::string file_path = bmd.blob_file_path + kFilePathSeparator + name;
1999
- sfm->OnAddFile(file_path, bmd.blob_file_size).PermitUncheckedError();
2000
- referenced_files.insert(file_path);
2001
- }
2002
- }
2003
-
2004
- for (const auto& file_path : existing_data_files) {
2005
- if (referenced_files.find(file_path) != referenced_files.end()) {
2006
- continue;
2007
- }
2008
- // There shouldn't be any duplicated files. In case there is, SstFileManager
2009
- // will take care of deduping it.
2010
- sfm->OnAddFile(file_path).PermitUncheckedError();
2011
- }
2012
- }
2013
-
2014
- Status DBImpl::Open(const DBOptions& db_options, const std::string& dbname,
2015
- const std::vector<ColumnFamilyDescriptor>& column_families,
2016
- std::vector<ColumnFamilyHandle*>* handles, DB** dbptr,
2017
- const bool seq_per_batch, const bool batch_per_txn,
2018
- const bool is_retry, bool* can_retry) {
2019
- const WriteOptions write_options(Env::IOActivity::kDBOpen);
2020
- const ReadOptions read_options(Env::IOActivity::kDBOpen);
2021
-
2022
- Status s = ValidateOptionsByTable(db_options, column_families);
2023
- if (!s.ok()) {
2024
- return s;
2025
- }
2026
-
2027
- s = ValidateOptions(db_options, column_families);
2028
- if (!s.ok()) {
2029
- return s;
2030
- }
2031
-
2032
- *dbptr = nullptr;
2033
- assert(handles);
2034
- handles->clear();
2035
-
2036
- size_t max_write_buffer_size = 0;
2037
- for (const auto& cf : column_families) {
2038
- max_write_buffer_size =
2039
- std::max(max_write_buffer_size, cf.options.write_buffer_size);
2040
- }
2041
-
2042
- DBImpl* impl = new DBImpl(db_options, dbname, seq_per_batch, batch_per_txn);
2043
- if (!impl->immutable_db_options_.info_log) {
2044
- s = impl->init_logger_creation_s_;
2045
- delete impl;
2046
- return s;
2047
- } else {
2048
- assert(impl->init_logger_creation_s_.ok());
2049
- }
2050
- s = impl->env_->CreateDirIfMissing(impl->immutable_db_options_.GetWalDir());
2051
- if (s.ok()) {
2052
- std::vector<std::string> paths;
2053
- for (auto& db_path : impl->immutable_db_options_.db_paths) {
2054
- paths.emplace_back(db_path.path);
2055
- }
2056
- for (auto& cf : column_families) {
2057
- for (auto& cf_path : cf.options.cf_paths) {
2058
- paths.emplace_back(cf_path.path);
2059
- }
2060
- }
2061
- for (const auto& path : paths) {
2062
- s = impl->env_->CreateDirIfMissing(path);
2063
- if (!s.ok()) {
2064
- break;
2065
- }
2066
- }
2067
-
2068
- // For recovery from NoSpace() error, we can only handle
2069
- // the case where the database is stored in a single path
2070
- if (paths.size() <= 1) {
2071
- impl->error_handler_.EnableAutoRecovery();
2072
- }
2073
- }
2074
- if (s.ok()) {
2075
- s = impl->CreateArchivalDirectory();
2076
- }
2077
- if (!s.ok()) {
2078
- delete impl;
2079
- return s;
2080
- }
2081
-
2082
- impl->wal_in_db_path_ = impl->immutable_db_options_.IsWalDirSameAsDBPath();
2083
- RecoveryContext recovery_ctx;
2084
- impl->options_mutex_.Lock();
2085
- impl->mutex_.Lock();
2086
-
2087
- // Handles create_if_missing, error_if_exists
2088
- uint64_t recovered_seq(kMaxSequenceNumber);
2089
- s = impl->Recover(column_families, false /* read_only */,
2090
- false /* error_if_wal_file_exists */,
2091
- false /* error_if_data_exists_in_wals */, is_retry,
2092
- &recovered_seq, &recovery_ctx, can_retry);
2093
- if (s.ok()) {
2094
- uint64_t new_log_number = impl->versions_->NewFileNumber();
2095
- log::Writer* new_log = nullptr;
2096
- const size_t preallocate_block_size =
2097
- impl->GetWalPreallocateBlockSize(max_write_buffer_size);
2098
- s = impl->CreateWAL(write_options, new_log_number, 0 /*recycle_log_number*/,
2099
- preallocate_block_size, &new_log);
2100
- if (s.ok()) {
2101
- // Prevent log files created by previous instance from being recycled.
2102
- // They might be in alive_log_file_, and might get recycled otherwise.
2103
- impl->min_log_number_to_recycle_ = new_log_number;
2104
- }
2105
- if (s.ok()) {
2106
- InstrumentedMutexLock wl(&impl->log_write_mutex_);
2107
- impl->logfile_number_ = new_log_number;
2108
- assert(new_log != nullptr);
2109
- assert(impl->logs_.empty());
2110
- impl->logs_.emplace_back(new_log_number, new_log);
2111
- }
2112
-
2113
- if (s.ok()) {
2114
- impl->alive_log_files_.emplace_back(impl->logfile_number_);
2115
- // In WritePrepared there could be gap in sequence numbers. This breaks
2116
- // the trick we use in kPointInTimeRecovery which assumes the first seq in
2117
- // the log right after the corrupted log is one larger than the last seq
2118
- // we read from the wals. To let this trick keep working, we add a dummy
2119
- // entry with the expected sequence to the first log right after recovery.
2120
- // In non-WritePrepared case also the new log after recovery could be
2121
- // empty, and thus missing the consecutive seq hint to distinguish
2122
- // middle-log corruption to corrupted-log-remained-after-recovery. This
2123
- // case also will be addressed by a dummy write.
2124
- if (recovered_seq != kMaxSequenceNumber) {
2125
- WriteBatch empty_batch;
2126
- WriteBatchInternal::SetSequence(&empty_batch, recovered_seq);
2127
- uint64_t log_used, log_size;
2128
- log::Writer* log_writer = impl->logs_.back().writer;
2129
- LogFileNumberSize& log_file_number_size = impl->alive_log_files_.back();
2130
-
2131
- assert(log_writer->get_log_number() == log_file_number_size.number);
2132
- impl->mutex_.AssertHeld();
2133
- s = impl->WriteToWAL(empty_batch, write_options, log_writer, &log_used,
2134
- &log_size, log_file_number_size);
2135
- if (s.ok()) {
2136
- // Need to fsync, otherwise it might get lost after a power reset.
2137
- s = impl->FlushWAL(write_options, false);
2138
- TEST_SYNC_POINT_CALLBACK("DBImpl::Open::BeforeSyncWAL", /*arg=*/&s);
2139
- IOOptions opts;
2140
- if (s.ok()) {
2141
- s = WritableFileWriter::PrepareIOOptions(write_options, opts);
2142
- }
2143
- if (s.ok()) {
2144
- s = log_writer->file()->Sync(opts,
2145
- impl->immutable_db_options_.use_fsync);
2146
- }
2147
- }
2148
- }
2149
- }
2150
- }
2151
- if (s.ok()) {
2152
- s = impl->LogAndApplyForRecovery(recovery_ctx);
2153
- }
2154
-
2155
- if (s.ok() && impl->immutable_db_options_.persist_stats_to_disk) {
2156
- impl->mutex_.AssertHeld();
2157
- s = impl->InitPersistStatsColumnFamily();
2158
- }
2159
-
2160
- if (s.ok()) {
2161
- // set column family handles
2162
- for (const auto& cf : column_families) {
2163
- auto cfd =
2164
- impl->versions_->GetColumnFamilySet()->GetColumnFamily(cf.name);
2165
- if (cfd != nullptr) {
2166
- handles->push_back(
2167
- new ColumnFamilyHandleImpl(cfd, impl, &impl->mutex_));
2168
- impl->NewThreadStatusCfInfo(cfd);
2169
- } else {
2170
- if (db_options.create_missing_column_families) {
2171
- // missing column family, create it
2172
- ColumnFamilyHandle* handle = nullptr;
2173
- impl->mutex_.Unlock();
2174
- // NOTE: the work normally done in WrapUpCreateColumnFamilies will
2175
- // be done separately below.
2176
- s = impl->CreateColumnFamilyImpl(read_options, write_options,
2177
- cf.options, cf.name, &handle);
2178
- impl->mutex_.Lock();
2179
- if (s.ok()) {
2180
- handles->push_back(handle);
2181
- } else {
2182
- break;
2183
- }
2184
- } else {
2185
- s = Status::InvalidArgument("Column family not found", cf.name);
2186
- break;
2187
- }
2188
- }
2189
- }
2190
- }
2191
-
2192
- if (s.ok()) {
2193
- SuperVersionContext sv_context(/* create_superversion */ true);
2194
- for (auto cfd : *impl->versions_->GetColumnFamilySet()) {
2195
- impl->InstallSuperVersionAndScheduleWork(
2196
- cfd, &sv_context, *cfd->GetLatestMutableCFOptions());
2197
- }
2198
- sv_context.Clean();
2199
- }
2200
-
2201
- if (s.ok() && impl->immutable_db_options_.persist_stats_to_disk) {
2202
- // try to read format version
2203
- s = impl->PersistentStatsProcessFormatVersion();
2204
- }
2205
-
2206
- if (s.ok()) {
2207
- for (auto cfd : *impl->versions_->GetColumnFamilySet()) {
2208
- if (!cfd->mem()->IsSnapshotSupported()) {
2209
- impl->is_snapshot_supported_ = false;
2210
- }
2211
- if (cfd->ioptions()->merge_operator != nullptr &&
2212
- !cfd->mem()->IsMergeOperatorSupported()) {
2213
- s = Status::InvalidArgument(
2214
- "The memtable of column family %s does not support merge operator "
2215
- "its options.merge_operator is non-null",
2216
- cfd->GetName().c_str());
2217
- }
2218
- if (!s.ok()) {
2219
- break;
2220
- }
2221
- }
2222
- }
2223
- TEST_SYNC_POINT("DBImpl::Open:Opened");
2224
- Status persist_options_status;
2225
- if (s.ok()) {
2226
- // Persist RocksDB Options before scheduling the compaction.
2227
- // The WriteOptionsFile() will release and lock the mutex internally.
2228
- persist_options_status =
2229
- impl->WriteOptionsFile(write_options, true /*db_mutex_already_held*/);
2230
- *dbptr = impl;
2231
- impl->opened_successfully_ = true;
2232
- } else {
2233
- persist_options_status.PermitUncheckedError();
2234
- }
2235
- impl->mutex_.Unlock();
2236
-
2237
- auto sfm = static_cast<SstFileManagerImpl*>(
2238
- impl->immutable_db_options_.sst_file_manager.get());
2239
- if (s.ok() && sfm) {
2240
- // Set Statistics ptr for SstFileManager to dump the stats of
2241
- // DeleteScheduler.
2242
- sfm->SetStatisticsPtr(impl->immutable_db_options_.statistics);
2243
- ROCKS_LOG_INFO(impl->immutable_db_options_.info_log,
2244
- "SstFileManager instance %p", sfm);
2245
-
2246
- impl->TrackExistingDataFiles(recovery_ctx.existing_data_files_);
2247
-
2248
- // Reserve some disk buffer space. This is a heuristic - when we run out
2249
- // of disk space, this ensures that there is at least write_buffer_size
2250
- // amount of free space before we resume DB writes. In low disk space
2251
- // conditions, we want to avoid a lot of small L0 files due to frequent
2252
- // WAL write failures and resultant forced flushes
2253
- sfm->ReserveDiskBuffer(max_write_buffer_size,
2254
- impl->immutable_db_options_.db_paths[0].path);
2255
- }
2256
-
2257
- if (s.ok()) {
2258
- // When the DB is stopped, it's possible that there are some .trash files
2259
- // that were not deleted yet, when we open the DB we will find these .trash
2260
- // files and schedule them to be deleted (or delete immediately if
2261
- // SstFileManager was not used).
2262
- // Note that we only start doing this and below delete obsolete file after
2263
- // `TrackExistingDataFiles` are called, the `max_trash_db_ratio` is
2264
- // ineffective otherwise and these files' deletion won't be rate limited
2265
- // which can cause discard stall.
2266
- for (const auto& path : impl->CollectAllDBPaths()) {
2267
- DeleteScheduler::CleanupDirectory(impl->immutable_db_options_.env, sfm,
2268
- path)
2269
- .PermitUncheckedError();
2270
- }
2271
- impl->mutex_.Lock();
2272
- // This will do a full scan.
2273
- impl->DeleteObsoleteFiles();
2274
- TEST_SYNC_POINT("DBImpl::Open:AfterDeleteFiles");
2275
- impl->MaybeScheduleFlushOrCompaction();
2276
- impl->mutex_.Unlock();
2277
- }
2278
-
2279
- if (s.ok()) {
2280
- ROCKS_LOG_HEADER(impl->immutable_db_options_.info_log, "DB pointer %p",
2281
- impl);
2282
- LogFlush(impl->immutable_db_options_.info_log);
2283
- if (!impl->WALBufferIsEmpty()) {
2284
- s = impl->FlushWAL(write_options, false);
2285
- if (s.ok()) {
2286
- // Sync is needed otherwise WAL buffered data might get lost after a
2287
- // power reset.
2288
- log::Writer* log_writer = impl->logs_.back().writer;
2289
- IOOptions opts;
2290
- s = WritableFileWriter::PrepareIOOptions(write_options, opts);
2291
- if (s.ok()) {
2292
- s = log_writer->file()->Sync(opts,
2293
- impl->immutable_db_options_.use_fsync);
2294
- }
2295
- }
2296
- }
2297
- if (s.ok() && !persist_options_status.ok()) {
2298
- s = Status::IOError(
2299
- "DB::Open() failed --- Unable to persist Options file",
2300
- persist_options_status.ToString());
2301
- }
2302
- }
2303
- if (!s.ok()) {
2304
- ROCKS_LOG_WARN(impl->immutable_db_options_.info_log,
2305
- "DB::Open() failed: %s", s.ToString().c_str());
2306
- }
2307
- if (s.ok()) {
2308
- s = impl->StartPeriodicTaskScheduler();
2309
- }
2310
- if (s.ok()) {
2311
- s = impl->RegisterRecordSeqnoTimeWorker(read_options, write_options,
2312
- recovery_ctx.is_new_db_);
2313
- }
2314
- impl->options_mutex_.Unlock();
2315
- if (!s.ok()) {
2316
- for (auto* h : *handles) {
2317
- delete h;
2318
- }
2319
- handles->clear();
2320
- delete impl;
2321
- *dbptr = nullptr;
2322
- }
2323
- return s;
2324
- }
2325
- } // namespace ROCKSDB_NAMESPACE