rocksdb-native 2.6.2 → 2.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (956) hide show
  1. package/CMakeLists.txt +29 -17
  2. package/binding.js +1 -1
  3. package/package.json +7 -4
  4. package/prebuilds/darwin-arm64/rocksdb-native.bare +0 -0
  5. package/prebuilds/darwin-arm64/rocksdb-native.node +0 -0
  6. package/prebuilds/darwin-x64/rocksdb-native.bare +0 -0
  7. package/prebuilds/darwin-x64/rocksdb-native.node +0 -0
  8. package/prebuilds/ios-arm64/rocksdb-native.bare +0 -0
  9. package/prebuilds/ios-arm64-simulator/rocksdb-native.bare +0 -0
  10. package/prebuilds/ios-x64-simulator/rocksdb-native.bare +0 -0
  11. package/prebuilds/linux-arm64/rocksdb-native.bare +0 -0
  12. package/prebuilds/linux-arm64/rocksdb-native.node +0 -0
  13. package/prebuilds/linux-x64/rocksdb-native.bare +0 -0
  14. package/prebuilds/linux-x64/rocksdb-native.node +0 -0
  15. package/prebuilds/win32-arm64/rocksdb-native.bare +0 -0
  16. package/prebuilds/win32-arm64/rocksdb-native.node +0 -0
  17. package/prebuilds/win32-x64/rocksdb-native.bare +0 -0
  18. package/prebuilds/win32-x64/rocksdb-native.node +0 -0
  19. package/vendor/librocksdb/CMakeLists.txt +0 -94
  20. package/vendor/librocksdb/LICENSE +0 -201
  21. package/vendor/librocksdb/NOTICE +0 -13
  22. package/vendor/librocksdb/README.md +0 -11
  23. package/vendor/librocksdb/include/rocksdb.h +0 -294
  24. package/vendor/librocksdb/src/rocksdb.cc +0 -714
  25. package/vendor/librocksdb/vendor/rocksdb/CMakeLists.txt +0 -1642
  26. package/vendor/librocksdb/vendor/rocksdb/cache/cache.cc +0 -193
  27. package/vendor/librocksdb/vendor/rocksdb/cache/cache_bench.cc +0 -20
  28. package/vendor/librocksdb/vendor/rocksdb/cache/cache_bench_tool.cc +0 -1177
  29. package/vendor/librocksdb/vendor/rocksdb/cache/cache_entry_roles.cc +0 -104
  30. package/vendor/librocksdb/vendor/rocksdb/cache/cache_entry_roles.h +0 -20
  31. package/vendor/librocksdb/vendor/rocksdb/cache/cache_entry_stats.h +0 -182
  32. package/vendor/librocksdb/vendor/rocksdb/cache/cache_helpers.cc +0 -41
  33. package/vendor/librocksdb/vendor/rocksdb/cache/cache_helpers.h +0 -139
  34. package/vendor/librocksdb/vendor/rocksdb/cache/cache_key.cc +0 -364
  35. package/vendor/librocksdb/vendor/rocksdb/cache/cache_key.h +0 -143
  36. package/vendor/librocksdb/vendor/rocksdb/cache/cache_reservation_manager.cc +0 -184
  37. package/vendor/librocksdb/vendor/rocksdb/cache/cache_reservation_manager.h +0 -318
  38. package/vendor/librocksdb/vendor/rocksdb/cache/charged_cache.cc +0 -111
  39. package/vendor/librocksdb/vendor/rocksdb/cache/charged_cache.h +0 -61
  40. package/vendor/librocksdb/vendor/rocksdb/cache/clock_cache.cc +0 -3657
  41. package/vendor/librocksdb/vendor/rocksdb/cache/clock_cache.h +0 -1165
  42. package/vendor/librocksdb/vendor/rocksdb/cache/compressed_secondary_cache.cc +0 -414
  43. package/vendor/librocksdb/vendor/rocksdb/cache/compressed_secondary_cache.h +0 -151
  44. package/vendor/librocksdb/vendor/rocksdb/cache/lru_cache.cc +0 -726
  45. package/vendor/librocksdb/vendor/rocksdb/cache/lru_cache.h +0 -467
  46. package/vendor/librocksdb/vendor/rocksdb/cache/secondary_cache.cc +0 -12
  47. package/vendor/librocksdb/vendor/rocksdb/cache/secondary_cache_adapter.cc +0 -743
  48. package/vendor/librocksdb/vendor/rocksdb/cache/secondary_cache_adapter.h +0 -103
  49. package/vendor/librocksdb/vendor/rocksdb/cache/sharded_cache.cc +0 -147
  50. package/vendor/librocksdb/vendor/rocksdb/cache/sharded_cache.h +0 -322
  51. package/vendor/librocksdb/vendor/rocksdb/cache/tiered_secondary_cache.cc +0 -125
  52. package/vendor/librocksdb/vendor/rocksdb/cache/tiered_secondary_cache.h +0 -158
  53. package/vendor/librocksdb/vendor/rocksdb/cache/typed_cache.h +0 -380
  54. package/vendor/librocksdb/vendor/rocksdb/cmake/RocksDBConfig.cmake.in +0 -54
  55. package/vendor/librocksdb/vendor/rocksdb/db/arena_wrapped_db_iter.cc +0 -182
  56. package/vendor/librocksdb/vendor/rocksdb/db/arena_wrapped_db_iter.h +0 -128
  57. package/vendor/librocksdb/vendor/rocksdb/db/attribute_group_iterator_impl.cc +0 -20
  58. package/vendor/librocksdb/vendor/rocksdb/db/attribute_group_iterator_impl.h +0 -83
  59. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_constants.h +0 -16
  60. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_contents.cc +0 -42
  61. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_contents.h +0 -60
  62. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_counting_iterator.h +0 -150
  63. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_fetcher.cc +0 -34
  64. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_fetcher.h +0 -37
  65. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_addition.cc +0 -156
  66. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_addition.h +0 -67
  67. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_builder.cc +0 -429
  68. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_builder.h +0 -113
  69. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_cache.cc +0 -101
  70. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_cache.h +0 -56
  71. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_completion_callback.h +0 -84
  72. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_garbage.cc +0 -134
  73. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_garbage.h +0 -57
  74. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_meta.cc +0 -62
  75. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_meta.h +0 -170
  76. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_reader.cc +0 -622
  77. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_file_reader.h +0 -111
  78. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_garbage_meter.cc +0 -100
  79. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_garbage_meter.h +0 -102
  80. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_index.h +0 -187
  81. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_format.cc +0 -143
  82. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_format.h +0 -164
  83. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_sequential_reader.cc +0 -133
  84. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_sequential_reader.h +0 -83
  85. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_writer.cc +0 -207
  86. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_log_writer.h +0 -87
  87. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_read_request.h +0 -58
  88. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_source.cc +0 -459
  89. package/vendor/librocksdb/vendor/rocksdb/db/blob/blob_source.h +0 -161
  90. package/vendor/librocksdb/vendor/rocksdb/db/blob/prefetch_buffer_collection.cc +0 -23
  91. package/vendor/librocksdb/vendor/rocksdb/db/blob/prefetch_buffer_collection.h +0 -38
  92. package/vendor/librocksdb/vendor/rocksdb/db/builder.cc +0 -517
  93. package/vendor/librocksdb/vendor/rocksdb/db/builder.h +0 -76
  94. package/vendor/librocksdb/vendor/rocksdb/db/c.cc +0 -7133
  95. package/vendor/librocksdb/vendor/rocksdb/db/c_test.c +0 -4052
  96. package/vendor/librocksdb/vendor/rocksdb/db/coalescing_iterator.cc +0 -47
  97. package/vendor/librocksdb/vendor/rocksdb/db/coalescing_iterator.h +0 -79
  98. package/vendor/librocksdb/vendor/rocksdb/db/column_family.cc +0 -1859
  99. package/vendor/librocksdb/vendor/rocksdb/db/column_family.h +0 -918
  100. package/vendor/librocksdb/vendor/rocksdb/db/compaction/clipping_iterator.h +0 -281
  101. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction.cc +0 -995
  102. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction.h +0 -602
  103. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_iteration_stats.h +0 -56
  104. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_iterator.cc +0 -1523
  105. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_iterator.h +0 -557
  106. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_job.cc +0 -2155
  107. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_job.h +0 -520
  108. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_outputs.cc +0 -802
  109. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_outputs.h +0 -411
  110. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker.cc +0 -1245
  111. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker.h +0 -322
  112. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_fifo.cc +0 -478
  113. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_fifo.h +0 -61
  114. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_level.cc +0 -977
  115. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_level.h +0 -32
  116. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_universal.cc +0 -1578
  117. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_picker_universal.h +0 -29
  118. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_service_job.cc +0 -835
  119. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_state.cc +0 -46
  120. package/vendor/librocksdb/vendor/rocksdb/db/compaction/compaction_state.h +0 -42
  121. package/vendor/librocksdb/vendor/rocksdb/db/compaction/file_pri.h +0 -94
  122. package/vendor/librocksdb/vendor/rocksdb/db/compaction/sst_partitioner.cc +0 -83
  123. package/vendor/librocksdb/vendor/rocksdb/db/compaction/subcompaction_state.cc +0 -106
  124. package/vendor/librocksdb/vendor/rocksdb/db/compaction/subcompaction_state.h +0 -220
  125. package/vendor/librocksdb/vendor/rocksdb/db/convenience.cc +0 -101
  126. package/vendor/librocksdb/vendor/rocksdb/db/convenience_impl.h +0 -15
  127. package/vendor/librocksdb/vendor/rocksdb/db/db_filesnapshot.cc +0 -506
  128. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/compacted_db_impl.cc +0 -275
  129. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/compacted_db_impl.h +0 -147
  130. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl.cc +0 -6767
  131. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl.h +0 -3056
  132. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_compaction_flush.cc +0 -4390
  133. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_debug.cc +0 -327
  134. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_experimental.cc +0 -164
  135. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_files.cc +0 -1032
  136. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_follower.cc +0 -348
  137. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_follower.h +0 -54
  138. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_open.cc +0 -2325
  139. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_readonly.cc +0 -376
  140. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_readonly.h +0 -179
  141. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_secondary.cc +0 -1025
  142. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_secondary.h +0 -322
  143. package/vendor/librocksdb/vendor/rocksdb/db/db_impl/db_impl_write.cc +0 -2624
  144. package/vendor/librocksdb/vendor/rocksdb/db/db_info_dumper.cc +0 -165
  145. package/vendor/librocksdb/vendor/rocksdb/db/db_info_dumper.h +0 -15
  146. package/vendor/librocksdb/vendor/rocksdb/db/db_iter.cc +0 -1774
  147. package/vendor/librocksdb/vendor/rocksdb/db/db_iter.h +0 -444
  148. package/vendor/librocksdb/vendor/rocksdb/db/db_test2.cc +0 -7839
  149. package/vendor/librocksdb/vendor/rocksdb/db/db_test_util.cc +0 -1800
  150. package/vendor/librocksdb/vendor/rocksdb/db/db_test_util.h +0 -1427
  151. package/vendor/librocksdb/vendor/rocksdb/db/db_with_timestamp_test_util.cc +0 -96
  152. package/vendor/librocksdb/vendor/rocksdb/db/db_with_timestamp_test_util.h +0 -126
  153. package/vendor/librocksdb/vendor/rocksdb/db/dbformat.cc +0 -282
  154. package/vendor/librocksdb/vendor/rocksdb/db/dbformat.h +0 -1101
  155. package/vendor/librocksdb/vendor/rocksdb/db/error_handler.cc +0 -806
  156. package/vendor/librocksdb/vendor/rocksdb/db/error_handler.h +0 -149
  157. package/vendor/librocksdb/vendor/rocksdb/db/event_helpers.cc +0 -332
  158. package/vendor/librocksdb/vendor/rocksdb/db/event_helpers.h +0 -78
  159. package/vendor/librocksdb/vendor/rocksdb/db/experimental.cc +0 -1212
  160. package/vendor/librocksdb/vendor/rocksdb/db/external_sst_file_ingestion_job.cc +0 -1249
  161. package/vendor/librocksdb/vendor/rocksdb/db/external_sst_file_ingestion_job.h +0 -268
  162. package/vendor/librocksdb/vendor/rocksdb/db/file_indexer.cc +0 -216
  163. package/vendor/librocksdb/vendor/rocksdb/db/file_indexer.h +0 -140
  164. package/vendor/librocksdb/vendor/rocksdb/db/flush_job.cc +0 -1217
  165. package/vendor/librocksdb/vendor/rocksdb/db/flush_job.h +0 -240
  166. package/vendor/librocksdb/vendor/rocksdb/db/flush_scheduler.cc +0 -86
  167. package/vendor/librocksdb/vendor/rocksdb/db/flush_scheduler.h +0 -55
  168. package/vendor/librocksdb/vendor/rocksdb/db/forward_iterator.cc +0 -1082
  169. package/vendor/librocksdb/vendor/rocksdb/db/forward_iterator.h +0 -166
  170. package/vendor/librocksdb/vendor/rocksdb/db/forward_iterator_bench.cc +0 -378
  171. package/vendor/librocksdb/vendor/rocksdb/db/history_trimming_iterator.h +0 -95
  172. package/vendor/librocksdb/vendor/rocksdb/db/import_column_family_job.cc +0 -463
  173. package/vendor/librocksdb/vendor/rocksdb/db/import_column_family_job.h +0 -91
  174. package/vendor/librocksdb/vendor/rocksdb/db/internal_stats.cc +0 -2198
  175. package/vendor/librocksdb/vendor/rocksdb/db/internal_stats.h +0 -896
  176. package/vendor/librocksdb/vendor/rocksdb/db/job_context.h +0 -254
  177. package/vendor/librocksdb/vendor/rocksdb/db/kv_checksum.h +0 -484
  178. package/vendor/librocksdb/vendor/rocksdb/db/log_format.h +0 -55
  179. package/vendor/librocksdb/vendor/rocksdb/db/log_reader.cc +0 -958
  180. package/vendor/librocksdb/vendor/rocksdb/db/log_reader.h +0 -245
  181. package/vendor/librocksdb/vendor/rocksdb/db/log_writer.cc +0 -355
  182. package/vendor/librocksdb/vendor/rocksdb/db/log_writer.h +0 -151
  183. package/vendor/librocksdb/vendor/rocksdb/db/logs_with_prep_tracker.cc +0 -67
  184. package/vendor/librocksdb/vendor/rocksdb/db/logs_with_prep_tracker.h +0 -62
  185. package/vendor/librocksdb/vendor/rocksdb/db/lookup_key.h +0 -68
  186. package/vendor/librocksdb/vendor/rocksdb/db/malloc_stats.cc +0 -52
  187. package/vendor/librocksdb/vendor/rocksdb/db/malloc_stats.h +0 -22
  188. package/vendor/librocksdb/vendor/rocksdb/db/memtable.cc +0 -1684
  189. package/vendor/librocksdb/vendor/rocksdb/db/memtable.h +0 -712
  190. package/vendor/librocksdb/vendor/rocksdb/db/memtable_list.cc +0 -1028
  191. package/vendor/librocksdb/vendor/rocksdb/db/memtable_list.h +0 -514
  192. package/vendor/librocksdb/vendor/rocksdb/db/merge_context.h +0 -150
  193. package/vendor/librocksdb/vendor/rocksdb/db/merge_helper.cc +0 -699
  194. package/vendor/librocksdb/vendor/rocksdb/db/merge_helper.h +0 -318
  195. package/vendor/librocksdb/vendor/rocksdb/db/merge_operator.cc +0 -167
  196. package/vendor/librocksdb/vendor/rocksdb/db/multi_cf_iterator_impl.h +0 -296
  197. package/vendor/librocksdb/vendor/rocksdb/db/output_validator.cc +0 -29
  198. package/vendor/librocksdb/vendor/rocksdb/db/output_validator.h +0 -45
  199. package/vendor/librocksdb/vendor/rocksdb/db/periodic_task_scheduler.cc +0 -110
  200. package/vendor/librocksdb/vendor/rocksdb/db/periodic_task_scheduler.h +0 -108
  201. package/vendor/librocksdb/vendor/rocksdb/db/pinned_iterators_manager.h +0 -92
  202. package/vendor/librocksdb/vendor/rocksdb/db/post_memtable_callback.h +0 -25
  203. package/vendor/librocksdb/vendor/rocksdb/db/pre_release_callback.h +0 -37
  204. package/vendor/librocksdb/vendor/rocksdb/db/range_del_aggregator.cc +0 -553
  205. package/vendor/librocksdb/vendor/rocksdb/db/range_del_aggregator.h +0 -481
  206. package/vendor/librocksdb/vendor/rocksdb/db/range_del_aggregator_bench.cc +0 -280
  207. package/vendor/librocksdb/vendor/rocksdb/db/range_tombstone_fragmenter.cc +0 -515
  208. package/vendor/librocksdb/vendor/rocksdb/db/range_tombstone_fragmenter.h +0 -361
  209. package/vendor/librocksdb/vendor/rocksdb/db/read_callback.h +0 -54
  210. package/vendor/librocksdb/vendor/rocksdb/db/repair.cc +0 -864
  211. package/vendor/librocksdb/vendor/rocksdb/db/seqno_to_time_mapping.cc +0 -573
  212. package/vendor/librocksdb/vendor/rocksdb/db/seqno_to_time_mapping.h +0 -307
  213. package/vendor/librocksdb/vendor/rocksdb/db/snapshot_checker.h +0 -58
  214. package/vendor/librocksdb/vendor/rocksdb/db/snapshot_impl.cc +0 -25
  215. package/vendor/librocksdb/vendor/rocksdb/db/snapshot_impl.h +0 -239
  216. package/vendor/librocksdb/vendor/rocksdb/db/table_cache.cc +0 -745
  217. package/vendor/librocksdb/vendor/rocksdb/db/table_cache.h +0 -298
  218. package/vendor/librocksdb/vendor/rocksdb/db/table_cache_sync_and_async.h +0 -135
  219. package/vendor/librocksdb/vendor/rocksdb/db/table_properties_collector.cc +0 -74
  220. package/vendor/librocksdb/vendor/rocksdb/db/table_properties_collector.h +0 -185
  221. package/vendor/librocksdb/vendor/rocksdb/db/transaction_log_impl.cc +0 -296
  222. package/vendor/librocksdb/vendor/rocksdb/db/transaction_log_impl.h +0 -128
  223. package/vendor/librocksdb/vendor/rocksdb/db/trim_history_scheduler.cc +0 -54
  224. package/vendor/librocksdb/vendor/rocksdb/db/trim_history_scheduler.h +0 -46
  225. package/vendor/librocksdb/vendor/rocksdb/db/version_builder.cc +0 -1431
  226. package/vendor/librocksdb/vendor/rocksdb/db/version_builder.h +0 -93
  227. package/vendor/librocksdb/vendor/rocksdb/db/version_edit.cc +0 -1119
  228. package/vendor/librocksdb/vendor/rocksdb/db/version_edit.h +0 -769
  229. package/vendor/librocksdb/vendor/rocksdb/db/version_edit_handler.cc +0 -1264
  230. package/vendor/librocksdb/vendor/rocksdb/db/version_edit_handler.h +0 -390
  231. package/vendor/librocksdb/vendor/rocksdb/db/version_set.cc +0 -7562
  232. package/vendor/librocksdb/vendor/rocksdb/db/version_set.h +0 -1799
  233. package/vendor/librocksdb/vendor/rocksdb/db/version_set_sync_and_async.h +0 -169
  234. package/vendor/librocksdb/vendor/rocksdb/db/version_util.h +0 -77
  235. package/vendor/librocksdb/vendor/rocksdb/db/wal_edit.cc +0 -211
  236. package/vendor/librocksdb/vendor/rocksdb/db/wal_edit.h +0 -177
  237. package/vendor/librocksdb/vendor/rocksdb/db/wal_manager.cc +0 -539
  238. package/vendor/librocksdb/vendor/rocksdb/db/wal_manager.h +0 -138
  239. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_column_serialization.cc +0 -166
  240. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_column_serialization.h +0 -57
  241. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_columns.cc +0 -22
  242. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_columns_helper.cc +0 -52
  243. package/vendor/librocksdb/vendor/rocksdb/db/wide/wide_columns_helper.h +0 -40
  244. package/vendor/librocksdb/vendor/rocksdb/db/write_batch.cc +0 -3394
  245. package/vendor/librocksdb/vendor/rocksdb/db/write_batch_base.cc +0 -94
  246. package/vendor/librocksdb/vendor/rocksdb/db/write_batch_internal.h +0 -408
  247. package/vendor/librocksdb/vendor/rocksdb/db/write_callback.h +0 -27
  248. package/vendor/librocksdb/vendor/rocksdb/db/write_controller.cc +0 -121
  249. package/vendor/librocksdb/vendor/rocksdb/db/write_controller.h +0 -148
  250. package/vendor/librocksdb/vendor/rocksdb/db/write_stall_stats.cc +0 -179
  251. package/vendor/librocksdb/vendor/rocksdb/db/write_stall_stats.h +0 -47
  252. package/vendor/librocksdb/vendor/rocksdb/db/write_thread.cc +0 -931
  253. package/vendor/librocksdb/vendor/rocksdb/db/write_thread.h +0 -498
  254. package/vendor/librocksdb/vendor/rocksdb/env/composite_env.cc +0 -534
  255. package/vendor/librocksdb/vendor/rocksdb/env/composite_env_wrapper.h +0 -399
  256. package/vendor/librocksdb/vendor/rocksdb/env/emulated_clock.h +0 -114
  257. package/vendor/librocksdb/vendor/rocksdb/env/env.cc +0 -1253
  258. package/vendor/librocksdb/vendor/rocksdb/env/env_chroot.cc +0 -149
  259. package/vendor/librocksdb/vendor/rocksdb/env/env_chroot.h +0 -55
  260. package/vendor/librocksdb/vendor/rocksdb/env/env_encryption.cc +0 -1192
  261. package/vendor/librocksdb/vendor/rocksdb/env/env_encryption_ctr.h +0 -97
  262. package/vendor/librocksdb/vendor/rocksdb/env/env_posix.cc +0 -530
  263. package/vendor/librocksdb/vendor/rocksdb/env/file_system.cc +0 -278
  264. package/vendor/librocksdb/vendor/rocksdb/env/file_system_tracer.cc +0 -564
  265. package/vendor/librocksdb/vendor/rocksdb/env/file_system_tracer.h +0 -461
  266. package/vendor/librocksdb/vendor/rocksdb/env/fs_on_demand.cc +0 -331
  267. package/vendor/librocksdb/vendor/rocksdb/env/fs_on_demand.h +0 -139
  268. package/vendor/librocksdb/vendor/rocksdb/env/fs_posix.cc +0 -1285
  269. package/vendor/librocksdb/vendor/rocksdb/env/fs_readonly.h +0 -105
  270. package/vendor/librocksdb/vendor/rocksdb/env/fs_remap.cc +0 -341
  271. package/vendor/librocksdb/vendor/rocksdb/env/fs_remap.h +0 -137
  272. package/vendor/librocksdb/vendor/rocksdb/env/io_posix.cc +0 -1738
  273. package/vendor/librocksdb/vendor/rocksdb/env/io_posix.h +0 -517
  274. package/vendor/librocksdb/vendor/rocksdb/env/mock_env.cc +0 -1058
  275. package/vendor/librocksdb/vendor/rocksdb/env/mock_env.h +0 -144
  276. package/vendor/librocksdb/vendor/rocksdb/env/unique_id_gen.cc +0 -243
  277. package/vendor/librocksdb/vendor/rocksdb/env/unique_id_gen.h +0 -119
  278. package/vendor/librocksdb/vendor/rocksdb/file/delete_scheduler.cc +0 -513
  279. package/vendor/librocksdb/vendor/rocksdb/file/delete_scheduler.h +0 -200
  280. package/vendor/librocksdb/vendor/rocksdb/file/file_prefetch_buffer.cc +0 -992
  281. package/vendor/librocksdb/vendor/rocksdb/file/file_prefetch_buffer.h +0 -629
  282. package/vendor/librocksdb/vendor/rocksdb/file/file_util.cc +0 -308
  283. package/vendor/librocksdb/vendor/rocksdb/file/file_util.h +0 -123
  284. package/vendor/librocksdb/vendor/rocksdb/file/filename.cc +0 -538
  285. package/vendor/librocksdb/vendor/rocksdb/file/filename.h +0 -186
  286. package/vendor/librocksdb/vendor/rocksdb/file/line_file_reader.cc +0 -73
  287. package/vendor/librocksdb/vendor/rocksdb/file/line_file_reader.h +0 -60
  288. package/vendor/librocksdb/vendor/rocksdb/file/random_access_file_reader.cc +0 -639
  289. package/vendor/librocksdb/vendor/rocksdb/file/random_access_file_reader.h +0 -197
  290. package/vendor/librocksdb/vendor/rocksdb/file/read_write_util.cc +0 -33
  291. package/vendor/librocksdb/vendor/rocksdb/file/read_write_util.h +0 -31
  292. package/vendor/librocksdb/vendor/rocksdb/file/readahead_file_info.h +0 -33
  293. package/vendor/librocksdb/vendor/rocksdb/file/readahead_raf.cc +0 -169
  294. package/vendor/librocksdb/vendor/rocksdb/file/readahead_raf.h +0 -29
  295. package/vendor/librocksdb/vendor/rocksdb/file/sequence_file_reader.cc +0 -324
  296. package/vendor/librocksdb/vendor/rocksdb/file/sequence_file_reader.h +0 -127
  297. package/vendor/librocksdb/vendor/rocksdb/file/sst_file_manager_impl.cc +0 -525
  298. package/vendor/librocksdb/vendor/rocksdb/file/sst_file_manager_impl.h +0 -220
  299. package/vendor/librocksdb/vendor/rocksdb/file/writable_file_writer.cc +0 -1007
  300. package/vendor/librocksdb/vendor/rocksdb/file/writable_file_writer.h +0 -370
  301. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/advanced_cache.h +0 -665
  302. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/advanced_options.h +0 -1101
  303. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/attribute_groups.h +0 -114
  304. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/block_cache_trace_writer.h +0 -149
  305. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/c.h +0 -3122
  306. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/cache.h +0 -579
  307. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/cache_bench_tool.h +0 -14
  308. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/cleanable.h +0 -128
  309. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/compaction_filter.h +0 -374
  310. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/compaction_job_stats.h +0 -112
  311. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/comparator.h +0 -231
  312. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/compression_type.h +0 -186
  313. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/concurrent_task_limiter.h +0 -51
  314. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/configurable.h +0 -390
  315. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/convenience.h +0 -466
  316. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/customizable.h +0 -229
  317. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/data_structure.h +0 -186
  318. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db.h +0 -2174
  319. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db_bench_tool.h +0 -11
  320. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db_dump_tool.h +0 -43
  321. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/db_stress_tool.h +0 -11
  322. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/env.h +0 -1920
  323. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/env_encryption.h +0 -363
  324. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/experimental.h +0 -492
  325. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/file_checksum.h +0 -146
  326. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/file_system.h +0 -1961
  327. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/filter_policy.h +0 -211
  328. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/flush_block_policy.h +0 -75
  329. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/functor_wrapper.h +0 -56
  330. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/io_status.h +0 -244
  331. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/iostats_context.h +0 -98
  332. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/iterator.h +0 -104
  333. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/iterator_base.h +0 -90
  334. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/ldb_tool.h +0 -42
  335. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/listener.h +0 -869
  336. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/memory_allocator.h +0 -87
  337. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/memtablerep.h +0 -421
  338. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/merge_operator.h +0 -337
  339. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/metadata.h +0 -258
  340. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/options.h +0 -2339
  341. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/perf_context.h +0 -319
  342. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/perf_level.h +0 -39
  343. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/persistent_cache.h +0 -74
  344. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/port_defs.h +0 -26
  345. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/rate_limiter.h +0 -172
  346. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/rocksdb_namespace.h +0 -16
  347. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/secondary_cache.h +0 -220
  348. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/slice.h +0 -264
  349. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/slice_transform.h +0 -135
  350. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/snapshot.h +0 -53
  351. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_dump_tool.h +0 -17
  352. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_file_manager.h +0 -139
  353. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_file_reader.h +0 -61
  354. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_file_writer.h +0 -203
  355. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/sst_partitioner.h +0 -142
  356. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/statistics.h +0 -794
  357. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/stats_history.h +0 -70
  358. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/status.h +0 -609
  359. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/system_clock.h +0 -129
  360. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/table.h +0 -938
  361. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/table_properties.h +0 -380
  362. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/table_reader_caller.h +0 -41
  363. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/thread_status.h +0 -197
  364. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/threadpool.h +0 -67
  365. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/trace_reader_writer.h +0 -52
  366. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/trace_record.h +0 -248
  367. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/trace_record_result.h +0 -187
  368. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/transaction_log.h +0 -128
  369. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/types.h +0 -113
  370. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/unique_id.h +0 -55
  371. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/universal_compaction.h +0 -127
  372. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/user_write_callback.h +0 -29
  373. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/agg_merge.h +0 -138
  374. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/backup_engine.h +0 -689
  375. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/cache_dump_load.h +0 -144
  376. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/checkpoint.h +0 -65
  377. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/convenience.h +0 -10
  378. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/customizable_util.h +0 -321
  379. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/db_ttl.h +0 -70
  380. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/debug.h +0 -46
  381. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/env_mirror.h +0 -179
  382. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/info_log_finder.h +0 -19
  383. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/ldb_cmd.h +0 -338
  384. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h +0 -75
  385. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/leveldb_options.h +0 -145
  386. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/lua/rocks_lua_custom_library.h +0 -43
  387. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/lua/rocks_lua_util.h +0 -55
  388. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/memory_util.h +0 -48
  389. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/object_registry.h +0 -583
  390. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/optimistic_transaction_db.h +0 -129
  391. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/option_change_migration.h +0 -24
  392. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/options_type.h +0 -1222
  393. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/options_util.h +0 -105
  394. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/replayer.h +0 -85
  395. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/sim_cache.h +0 -92
  396. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/stackable_db.h +0 -593
  397. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/table_properties_collectors.h +0 -133
  398. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/transaction.h +0 -765
  399. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/transaction_db.h +0 -510
  400. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/transaction_db_mutex.h +0 -89
  401. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/types_util.h +0 -36
  402. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/utilities/write_batch_with_index.h +0 -402
  403. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/version.h +0 -43
  404. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/wal_filter.h +0 -111
  405. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/wide_columns.h +0 -303
  406. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/write_batch.h +0 -518
  407. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/write_batch_base.h +0 -165
  408. package/vendor/librocksdb/vendor/rocksdb/include/rocksdb/write_buffer_manager.h +0 -183
  409. package/vendor/librocksdb/vendor/rocksdb/logging/auto_roll_logger.cc +0 -366
  410. package/vendor/librocksdb/vendor/rocksdb/logging/auto_roll_logger.h +0 -165
  411. package/vendor/librocksdb/vendor/rocksdb/logging/env_logger.h +0 -195
  412. package/vendor/librocksdb/vendor/rocksdb/logging/event_logger.cc +0 -68
  413. package/vendor/librocksdb/vendor/rocksdb/logging/event_logger.h +0 -202
  414. package/vendor/librocksdb/vendor/rocksdb/logging/log_buffer.cc +0 -91
  415. package/vendor/librocksdb/vendor/rocksdb/logging/log_buffer.h +0 -57
  416. package/vendor/librocksdb/vendor/rocksdb/logging/logging.h +0 -62
  417. package/vendor/librocksdb/vendor/rocksdb/memory/allocator.h +0 -58
  418. package/vendor/librocksdb/vendor/rocksdb/memory/arena.cc +0 -170
  419. package/vendor/librocksdb/vendor/rocksdb/memory/arena.h +0 -146
  420. package/vendor/librocksdb/vendor/rocksdb/memory/concurrent_arena.cc +0 -45
  421. package/vendor/librocksdb/vendor/rocksdb/memory/concurrent_arena.h +0 -215
  422. package/vendor/librocksdb/vendor/rocksdb/memory/jemalloc_nodump_allocator.cc +0 -304
  423. package/vendor/librocksdb/vendor/rocksdb/memory/jemalloc_nodump_allocator.h +0 -99
  424. package/vendor/librocksdb/vendor/rocksdb/memory/memkind_kmem_allocator.cc +0 -44
  425. package/vendor/librocksdb/vendor/rocksdb/memory/memkind_kmem_allocator.h +0 -43
  426. package/vendor/librocksdb/vendor/rocksdb/memory/memory_allocator.cc +0 -81
  427. package/vendor/librocksdb/vendor/rocksdb/memory/memory_allocator_impl.h +0 -47
  428. package/vendor/librocksdb/vendor/rocksdb/memory/memory_usage.h +0 -38
  429. package/vendor/librocksdb/vendor/rocksdb/memtable/alloc_tracker.cc +0 -63
  430. package/vendor/librocksdb/vendor/rocksdb/memtable/hash_linklist_rep.cc +0 -925
  431. package/vendor/librocksdb/vendor/rocksdb/memtable/hash_skiplist_rep.cc +0 -392
  432. package/vendor/librocksdb/vendor/rocksdb/memtable/inlineskiplist.h +0 -1051
  433. package/vendor/librocksdb/vendor/rocksdb/memtable/memtablerep_bench.cc +0 -687
  434. package/vendor/librocksdb/vendor/rocksdb/memtable/skiplist.h +0 -498
  435. package/vendor/librocksdb/vendor/rocksdb/memtable/skiplistrep.cc +0 -368
  436. package/vendor/librocksdb/vendor/rocksdb/memtable/stl_wrappers.h +0 -33
  437. package/vendor/librocksdb/vendor/rocksdb/memtable/vectorrep.cc +0 -307
  438. package/vendor/librocksdb/vendor/rocksdb/memtable/write_buffer_manager.cc +0 -185
  439. package/vendor/librocksdb/vendor/rocksdb/monitoring/file_read_sample.h +0 -23
  440. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram.cc +0 -280
  441. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram.h +0 -143
  442. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram_windowing.cc +0 -198
  443. package/vendor/librocksdb/vendor/rocksdb/monitoring/histogram_windowing.h +0 -84
  444. package/vendor/librocksdb/vendor/rocksdb/monitoring/in_memory_stats_history.cc +0 -50
  445. package/vendor/librocksdb/vendor/rocksdb/monitoring/in_memory_stats_history.h +0 -74
  446. package/vendor/librocksdb/vendor/rocksdb/monitoring/instrumented_mutex.cc +0 -90
  447. package/vendor/librocksdb/vendor/rocksdb/monitoring/instrumented_mutex.h +0 -126
  448. package/vendor/librocksdb/vendor/rocksdb/monitoring/iostats_context.cc +0 -78
  449. package/vendor/librocksdb/vendor/rocksdb/monitoring/iostats_context_imp.h +0 -62
  450. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_context.cc +0 -317
  451. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_context_imp.h +0 -103
  452. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_level.cc +0 -23
  453. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_level_imp.h +0 -14
  454. package/vendor/librocksdb/vendor/rocksdb/monitoring/perf_step_timer.h +0 -77
  455. package/vendor/librocksdb/vendor/rocksdb/monitoring/persistent_stats_history.cc +0 -173
  456. package/vendor/librocksdb/vendor/rocksdb/monitoring/persistent_stats_history.h +0 -83
  457. package/vendor/librocksdb/vendor/rocksdb/monitoring/statistics.cc +0 -561
  458. package/vendor/librocksdb/vendor/rocksdb/monitoring/statistics_impl.h +0 -143
  459. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_impl.cc +0 -163
  460. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_updater.cc +0 -328
  461. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_updater.h +0 -226
  462. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_updater_debug.cc +0 -43
  463. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_util.cc +0 -214
  464. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_util.h +0 -139
  465. package/vendor/librocksdb/vendor/rocksdb/monitoring/thread_status_util_debug.cc +0 -60
  466. package/vendor/librocksdb/vendor/rocksdb/options/cf_options.cc +0 -1218
  467. package/vendor/librocksdb/vendor/rocksdb/options/cf_options.h +0 -352
  468. package/vendor/librocksdb/vendor/rocksdb/options/configurable.cc +0 -720
  469. package/vendor/librocksdb/vendor/rocksdb/options/configurable_helper.h +0 -185
  470. package/vendor/librocksdb/vendor/rocksdb/options/configurable_test.h +0 -116
  471. package/vendor/librocksdb/vendor/rocksdb/options/customizable.cc +0 -133
  472. package/vendor/librocksdb/vendor/rocksdb/options/db_options.cc +0 -1113
  473. package/vendor/librocksdb/vendor/rocksdb/options/db_options.h +0 -160
  474. package/vendor/librocksdb/vendor/rocksdb/options/offpeak_time_info.cc +0 -59
  475. package/vendor/librocksdb/vendor/rocksdb/options/offpeak_time_info.h +0 -37
  476. package/vendor/librocksdb/vendor/rocksdb/options/options.cc +0 -717
  477. package/vendor/librocksdb/vendor/rocksdb/options/options_helper.cc +0 -1438
  478. package/vendor/librocksdb/vendor/rocksdb/options/options_helper.h +0 -115
  479. package/vendor/librocksdb/vendor/rocksdb/options/options_parser.cc +0 -745
  480. package/vendor/librocksdb/vendor/rocksdb/options/options_parser.h +0 -151
  481. package/vendor/librocksdb/vendor/rocksdb/port/jemalloc_helper.h +0 -107
  482. package/vendor/librocksdb/vendor/rocksdb/port/lang.h +0 -97
  483. package/vendor/librocksdb/vendor/rocksdb/port/likely.h +0 -18
  484. package/vendor/librocksdb/vendor/rocksdb/port/malloc.h +0 -17
  485. package/vendor/librocksdb/vendor/rocksdb/port/mmap.cc +0 -98
  486. package/vendor/librocksdb/vendor/rocksdb/port/mmap.h +0 -90
  487. package/vendor/librocksdb/vendor/rocksdb/port/port.h +0 -21
  488. package/vendor/librocksdb/vendor/rocksdb/port/port_dirent.h +0 -44
  489. package/vendor/librocksdb/vendor/rocksdb/port/port_example.h +0 -101
  490. package/vendor/librocksdb/vendor/rocksdb/port/port_posix.cc +0 -300
  491. package/vendor/librocksdb/vendor/rocksdb/port/port_posix.h +0 -246
  492. package/vendor/librocksdb/vendor/rocksdb/port/stack_trace.cc +0 -418
  493. package/vendor/librocksdb/vendor/rocksdb/port/stack_trace.h +0 -31
  494. package/vendor/librocksdb/vendor/rocksdb/port/sys_time.h +0 -63
  495. package/vendor/librocksdb/vendor/rocksdb/port/util_logger.h +0 -18
  496. package/vendor/librocksdb/vendor/rocksdb/port/win/env_default.cc +0 -45
  497. package/vendor/librocksdb/vendor/rocksdb/port/win/env_win.cc +0 -1436
  498. package/vendor/librocksdb/vendor/rocksdb/port/win/env_win.h +0 -305
  499. package/vendor/librocksdb/vendor/rocksdb/port/win/io_win.cc +0 -1101
  500. package/vendor/librocksdb/vendor/rocksdb/port/win/io_win.h +0 -504
  501. package/vendor/librocksdb/vendor/rocksdb/port/win/port_win.cc +0 -305
  502. package/vendor/librocksdb/vendor/rocksdb/port/win/port_win.h +0 -382
  503. package/vendor/librocksdb/vendor/rocksdb/port/win/win_jemalloc.cc +0 -80
  504. package/vendor/librocksdb/vendor/rocksdb/port/win/win_logger.cc +0 -192
  505. package/vendor/librocksdb/vendor/rocksdb/port/win/win_logger.h +0 -64
  506. package/vendor/librocksdb/vendor/rocksdb/port/win/win_thread.cc +0 -170
  507. package/vendor/librocksdb/vendor/rocksdb/port/win/win_thread.h +0 -117
  508. package/vendor/librocksdb/vendor/rocksdb/port/win/xpress_win.cc +0 -210
  509. package/vendor/librocksdb/vendor/rocksdb/port/win/xpress_win.h +0 -26
  510. package/vendor/librocksdb/vendor/rocksdb/port/xpress.h +0 -17
  511. package/vendor/librocksdb/vendor/rocksdb/rocksdb.pc.in +0 -10
  512. package/vendor/librocksdb/vendor/rocksdb/table/adaptive/adaptive_table_factory.cc +0 -119
  513. package/vendor/librocksdb/vendor/rocksdb/table/adaptive/adaptive_table_factory.h +0 -56
  514. package/vendor/librocksdb/vendor/rocksdb/table/block_based/binary_search_index_reader.cc +0 -73
  515. package/vendor/librocksdb/vendor/rocksdb/table/block_based/binary_search_index_reader.h +0 -48
  516. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block.cc +0 -1341
  517. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block.h +0 -969
  518. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_builder.cc +0 -2148
  519. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_builder.h +0 -208
  520. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_factory.cc +0 -980
  521. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_factory.h +0 -102
  522. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_iterator.cc +0 -893
  523. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_iterator.h +0 -445
  524. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader.cc +0 -3296
  525. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader.h +0 -785
  526. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader_impl.h +0 -205
  527. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_based_table_reader_sync_and_async.h +0 -819
  528. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_builder.cc +0 -266
  529. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_builder.h +0 -128
  530. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_cache.cc +0 -108
  531. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_cache.h +0 -190
  532. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefetcher.cc +0 -158
  533. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefetcher.h +0 -74
  534. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefix_index.cc +0 -226
  535. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_prefix_index.h +0 -70
  536. package/vendor/librocksdb/vendor/rocksdb/table/block_based/block_type.h +0 -34
  537. package/vendor/librocksdb/vendor/rocksdb/table/block_based/cachable_entry.h +0 -249
  538. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_footer.cc +0 -59
  539. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_footer.h +0 -25
  540. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_hash_index.cc +0 -94
  541. package/vendor/librocksdb/vendor/rocksdb/table/block_based/data_block_hash_index.h +0 -137
  542. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_block.h +0 -189
  543. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_block_reader_common.cc +0 -169
  544. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_block_reader_common.h +0 -79
  545. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_policy.cc +0 -1989
  546. package/vendor/librocksdb/vendor/rocksdb/table/block_based/filter_policy_internal.h +0 -341
  547. package/vendor/librocksdb/vendor/rocksdb/table/block_based/flush_block_policy.cc +0 -132
  548. package/vendor/librocksdb/vendor/rocksdb/table/block_based/flush_block_policy_impl.h +0 -40
  549. package/vendor/librocksdb/vendor/rocksdb/table/block_based/full_filter_block.cc +0 -297
  550. package/vendor/librocksdb/vendor/rocksdb/table/block_based/full_filter_block.h +0 -142
  551. package/vendor/librocksdb/vendor/rocksdb/table/block_based/hash_index_reader.cc +0 -146
  552. package/vendor/librocksdb/vendor/rocksdb/table/block_based/hash_index_reader.h +0 -49
  553. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_builder.cc +0 -305
  554. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_builder.h +0 -534
  555. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_reader_common.cc +0 -62
  556. package/vendor/librocksdb/vendor/rocksdb/table/block_based/index_reader_common.h +0 -94
  557. package/vendor/librocksdb/vendor/rocksdb/table/block_based/mock_block_based_table.h +0 -62
  558. package/vendor/librocksdb/vendor/rocksdb/table/block_based/parsed_full_filter_block.cc +0 -23
  559. package/vendor/librocksdb/vendor/rocksdb/table/block_based/parsed_full_filter_block.h +0 -47
  560. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_filter_block.cc +0 -610
  561. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_filter_block.h +0 -188
  562. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_iterator.cc +0 -164
  563. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_iterator.h +0 -160
  564. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_reader.cc +0 -264
  565. package/vendor/librocksdb/vendor/rocksdb/table/block_based/partitioned_index_reader.h +0 -58
  566. package/vendor/librocksdb/vendor/rocksdb/table/block_based/reader_common.cc +0 -64
  567. package/vendor/librocksdb/vendor/rocksdb/table/block_based/reader_common.h +0 -36
  568. package/vendor/librocksdb/vendor/rocksdb/table/block_based/uncompression_dict_reader.cc +0 -118
  569. package/vendor/librocksdb/vendor/rocksdb/table/block_based/uncompression_dict_reader.h +0 -60
  570. package/vendor/librocksdb/vendor/rocksdb/table/block_fetcher.cc +0 -458
  571. package/vendor/librocksdb/vendor/rocksdb/table/block_fetcher.h +0 -168
  572. package/vendor/librocksdb/vendor/rocksdb/table/compaction_merging_iterator.cc +0 -370
  573. package/vendor/librocksdb/vendor/rocksdb/table/compaction_merging_iterator.h +0 -45
  574. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_builder.cc +0 -555
  575. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_builder.h +0 -136
  576. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_factory.cc +0 -100
  577. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_factory.h +0 -80
  578. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_reader.cc +0 -416
  579. package/vendor/librocksdb/vendor/rocksdb/table/cuckoo/cuckoo_table_reader.h +0 -100
  580. package/vendor/librocksdb/vendor/rocksdb/table/format.cc +0 -708
  581. package/vendor/librocksdb/vendor/rocksdb/table/format.h +0 -439
  582. package/vendor/librocksdb/vendor/rocksdb/table/get_context.cc +0 -622
  583. package/vendor/librocksdb/vendor/rocksdb/table/get_context.h +0 -259
  584. package/vendor/librocksdb/vendor/rocksdb/table/internal_iterator.h +0 -242
  585. package/vendor/librocksdb/vendor/rocksdb/table/iter_heap.h +0 -44
  586. package/vendor/librocksdb/vendor/rocksdb/table/iterator.cc +0 -134
  587. package/vendor/librocksdb/vendor/rocksdb/table/iterator_wrapper.h +0 -225
  588. package/vendor/librocksdb/vendor/rocksdb/table/merging_iterator.cc +0 -1755
  589. package/vendor/librocksdb/vendor/rocksdb/table/merging_iterator.h +0 -100
  590. package/vendor/librocksdb/vendor/rocksdb/table/meta_blocks.cc +0 -590
  591. package/vendor/librocksdb/vendor/rocksdb/table/meta_blocks.h +0 -181
  592. package/vendor/librocksdb/vendor/rocksdb/table/mock_table.cc +0 -355
  593. package/vendor/librocksdb/vendor/rocksdb/table/mock_table.h +0 -92
  594. package/vendor/librocksdb/vendor/rocksdb/table/multiget_context.h +0 -405
  595. package/vendor/librocksdb/vendor/rocksdb/table/persistent_cache_helper.cc +0 -110
  596. package/vendor/librocksdb/vendor/rocksdb/table/persistent_cache_helper.h +0 -46
  597. package/vendor/librocksdb/vendor/rocksdb/table/persistent_cache_options.h +0 -34
  598. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_bloom.cc +0 -78
  599. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_bloom.h +0 -132
  600. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_builder.cc +0 -348
  601. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_builder.h +0 -151
  602. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_factory.cc +0 -295
  603. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_factory.h +0 -180
  604. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_index.cc +0 -211
  605. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_index.h +0 -246
  606. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_key_coding.cc +0 -508
  607. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_key_coding.h +0 -199
  608. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_reader.cc +0 -778
  609. package/vendor/librocksdb/vendor/rocksdb/table/plain/plain_table_reader.h +0 -243
  610. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_dumper.cc +0 -601
  611. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_dumper.h +0 -104
  612. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_reader.cc +0 -166
  613. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_writer.cc +0 -536
  614. package/vendor/librocksdb/vendor/rocksdb/table/sst_file_writer_collectors.h +0 -97
  615. package/vendor/librocksdb/vendor/rocksdb/table/table_builder.h +0 -239
  616. package/vendor/librocksdb/vendor/rocksdb/table/table_factory.cc +0 -52
  617. package/vendor/librocksdb/vendor/rocksdb/table/table_iterator.h +0 -69
  618. package/vendor/librocksdb/vendor/rocksdb/table/table_properties.cc +0 -357
  619. package/vendor/librocksdb/vendor/rocksdb/table/table_properties_internal.h +0 -14
  620. package/vendor/librocksdb/vendor/rocksdb/table/table_reader.h +0 -202
  621. package/vendor/librocksdb/vendor/rocksdb/table/table_reader_bench.cc +0 -341
  622. package/vendor/librocksdb/vendor/rocksdb/table/two_level_iterator.cc +0 -222
  623. package/vendor/librocksdb/vendor/rocksdb/table/two_level_iterator.h +0 -43
  624. package/vendor/librocksdb/vendor/rocksdb/table/unique_id.cc +0 -223
  625. package/vendor/librocksdb/vendor/rocksdb/table/unique_id_impl.h +0 -93
  626. package/vendor/librocksdb/vendor/rocksdb/test_util/mock_time_env.cc +0 -38
  627. package/vendor/librocksdb/vendor/rocksdb/test_util/mock_time_env.h +0 -109
  628. package/vendor/librocksdb/vendor/rocksdb/test_util/secondary_cache_test_util.cc +0 -93
  629. package/vendor/librocksdb/vendor/rocksdb/test_util/secondary_cache_test_util.h +0 -131
  630. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point.cc +0 -82
  631. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point.h +0 -182
  632. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point_impl.cc +0 -152
  633. package/vendor/librocksdb/vendor/rocksdb/test_util/sync_point_impl.h +0 -96
  634. package/vendor/librocksdb/vendor/rocksdb/test_util/testharness.cc +0 -105
  635. package/vendor/librocksdb/vendor/rocksdb/test_util/testharness.h +0 -124
  636. package/vendor/librocksdb/vendor/rocksdb/test_util/testutil.cc +0 -776
  637. package/vendor/librocksdb/vendor/rocksdb/test_util/testutil.h +0 -908
  638. package/vendor/librocksdb/vendor/rocksdb/test_util/transaction_test_util.cc +0 -400
  639. package/vendor/librocksdb/vendor/rocksdb/test_util/transaction_test_util.h +0 -147
  640. package/vendor/librocksdb/vendor/rocksdb/tools/CMakeLists.txt +0 -30
  641. package/vendor/librocksdb/vendor/rocksdb/tools/blob_dump.cc +0 -103
  642. package/vendor/librocksdb/vendor/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.cc +0 -2331
  643. package/vendor/librocksdb/vendor/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.h +0 -398
  644. package/vendor/librocksdb/vendor/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer_tool.cc +0 -17
  645. package/vendor/librocksdb/vendor/rocksdb/tools/db_bench.cc +0 -21
  646. package/vendor/librocksdb/vendor/rocksdb/tools/db_bench_tool.cc +0 -8743
  647. package/vendor/librocksdb/vendor/rocksdb/tools/db_repl_stress.cc +0 -132
  648. package/vendor/librocksdb/vendor/rocksdb/tools/dump/db_dump_tool.cc +0 -264
  649. package/vendor/librocksdb/vendor/rocksdb/tools/dump/rocksdb_dump.cc +0 -60
  650. package/vendor/librocksdb/vendor/rocksdb/tools/dump/rocksdb_undump.cc +0 -59
  651. package/vendor/librocksdb/vendor/rocksdb/tools/io_tracer_parser.cc +0 -17
  652. package/vendor/librocksdb/vendor/rocksdb/tools/io_tracer_parser_tool.cc +0 -142
  653. package/vendor/librocksdb/vendor/rocksdb/tools/io_tracer_parser_tool.h +0 -38
  654. package/vendor/librocksdb/vendor/rocksdb/tools/ldb.cc +0 -13
  655. package/vendor/librocksdb/vendor/rocksdb/tools/ldb_cmd.cc +0 -5044
  656. package/vendor/librocksdb/vendor/rocksdb/tools/ldb_cmd_impl.h +0 -814
  657. package/vendor/librocksdb/vendor/rocksdb/tools/ldb_tool.cc +0 -192
  658. package/vendor/librocksdb/vendor/rocksdb/tools/simulated_hybrid_file_system.cc +0 -244
  659. package/vendor/librocksdb/vendor/rocksdb/tools/simulated_hybrid_file_system.h +0 -124
  660. package/vendor/librocksdb/vendor/rocksdb/tools/sst_dump.cc +0 -12
  661. package/vendor/librocksdb/vendor/rocksdb/tools/sst_dump_tool.cc +0 -588
  662. package/vendor/librocksdb/vendor/rocksdb/tools/trace_analyzer.cc +0 -17
  663. package/vendor/librocksdb/vendor/rocksdb/tools/trace_analyzer_tool.cc +0 -1935
  664. package/vendor/librocksdb/vendor/rocksdb/tools/trace_analyzer_tool.h +0 -329
  665. package/vendor/librocksdb/vendor/rocksdb/tools/write_stress.cc +0 -305
  666. package/vendor/librocksdb/vendor/rocksdb/trace_replay/block_cache_tracer.cc +0 -509
  667. package/vendor/librocksdb/vendor/rocksdb/trace_replay/block_cache_tracer.h +0 -239
  668. package/vendor/librocksdb/vendor/rocksdb/trace_replay/io_tracer.cc +0 -303
  669. package/vendor/librocksdb/vendor/rocksdb/trace_replay/io_tracer.h +0 -185
  670. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record.cc +0 -206
  671. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record_handler.cc +0 -190
  672. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record_handler.h +0 -46
  673. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_record_result.cc +0 -146
  674. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_replay.cc +0 -632
  675. package/vendor/librocksdb/vendor/rocksdb/trace_replay/trace_replay.h +0 -184
  676. package/vendor/librocksdb/vendor/rocksdb/util/aligned_buffer.h +0 -235
  677. package/vendor/librocksdb/vendor/rocksdb/util/aligned_storage.h +0 -24
  678. package/vendor/librocksdb/vendor/rocksdb/util/async_file_reader.cc +0 -84
  679. package/vendor/librocksdb/vendor/rocksdb/util/async_file_reader.h +0 -144
  680. package/vendor/librocksdb/vendor/rocksdb/util/atomic.h +0 -111
  681. package/vendor/librocksdb/vendor/rocksdb/util/autovector.h +0 -397
  682. package/vendor/librocksdb/vendor/rocksdb/util/bloom_impl.h +0 -489
  683. package/vendor/librocksdb/vendor/rocksdb/util/build_version.cc.in +0 -79
  684. package/vendor/librocksdb/vendor/rocksdb/util/cast_util.h +0 -88
  685. package/vendor/librocksdb/vendor/rocksdb/util/channel.h +0 -69
  686. package/vendor/librocksdb/vendor/rocksdb/util/cleanable.cc +0 -181
  687. package/vendor/librocksdb/vendor/rocksdb/util/coding.cc +0 -90
  688. package/vendor/librocksdb/vendor/rocksdb/util/coding.h +0 -385
  689. package/vendor/librocksdb/vendor/rocksdb/util/coding_lean.h +0 -101
  690. package/vendor/librocksdb/vendor/rocksdb/util/compaction_job_stats_impl.cc +0 -94
  691. package/vendor/librocksdb/vendor/rocksdb/util/comparator.cc +0 -443
  692. package/vendor/librocksdb/vendor/rocksdb/util/compression.cc +0 -122
  693. package/vendor/librocksdb/vendor/rocksdb/util/compression.h +0 -1879
  694. package/vendor/librocksdb/vendor/rocksdb/util/compression_context_cache.cc +0 -106
  695. package/vendor/librocksdb/vendor/rocksdb/util/compression_context_cache.h +0 -47
  696. package/vendor/librocksdb/vendor/rocksdb/util/concurrent_task_limiter_impl.cc +0 -64
  697. package/vendor/librocksdb/vendor/rocksdb/util/concurrent_task_limiter_impl.h +0 -67
  698. package/vendor/librocksdb/vendor/rocksdb/util/core_local.h +0 -85
  699. package/vendor/librocksdb/vendor/rocksdb/util/coro_utils.h +0 -112
  700. package/vendor/librocksdb/vendor/rocksdb/util/crc32c.cc +0 -1295
  701. package/vendor/librocksdb/vendor/rocksdb/util/crc32c.h +0 -56
  702. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_arm64.cc +0 -213
  703. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_arm64.h +0 -51
  704. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc.c +0 -94
  705. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc.h +0 -21
  706. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc_asm.S +0 -756
  707. package/vendor/librocksdb/vendor/rocksdb/util/crc32c_ppc_constants.h +0 -900
  708. package/vendor/librocksdb/vendor/rocksdb/util/data_structure.cc +0 -16
  709. package/vendor/librocksdb/vendor/rocksdb/util/defer.h +0 -82
  710. package/vendor/librocksdb/vendor/rocksdb/util/distributed_mutex.h +0 -50
  711. package/vendor/librocksdb/vendor/rocksdb/util/duplicate_detector.h +0 -69
  712. package/vendor/librocksdb/vendor/rocksdb/util/dynamic_bloom.cc +0 -70
  713. package/vendor/librocksdb/vendor/rocksdb/util/dynamic_bloom.h +0 -214
  714. package/vendor/librocksdb/vendor/rocksdb/util/fastrange.h +0 -114
  715. package/vendor/librocksdb/vendor/rocksdb/util/file_checksum_helper.cc +0 -170
  716. package/vendor/librocksdb/vendor/rocksdb/util/file_checksum_helper.h +0 -101
  717. package/vendor/librocksdb/vendor/rocksdb/util/filter_bench.cc +0 -840
  718. package/vendor/librocksdb/vendor/rocksdb/util/gflags_compat.h +0 -29
  719. package/vendor/librocksdb/vendor/rocksdb/util/hash.cc +0 -201
  720. package/vendor/librocksdb/vendor/rocksdb/util/hash.h +0 -141
  721. package/vendor/librocksdb/vendor/rocksdb/util/hash128.h +0 -26
  722. package/vendor/librocksdb/vendor/rocksdb/util/hash_containers.h +0 -51
  723. package/vendor/librocksdb/vendor/rocksdb/util/hash_map.h +0 -67
  724. package/vendor/librocksdb/vendor/rocksdb/util/heap.h +0 -174
  725. package/vendor/librocksdb/vendor/rocksdb/util/kv_map.h +0 -33
  726. package/vendor/librocksdb/vendor/rocksdb/util/log_write_bench.cc +0 -88
  727. package/vendor/librocksdb/vendor/rocksdb/util/math.h +0 -351
  728. package/vendor/librocksdb/vendor/rocksdb/util/math128.h +0 -338
  729. package/vendor/librocksdb/vendor/rocksdb/util/murmurhash.cc +0 -196
  730. package/vendor/librocksdb/vendor/rocksdb/util/murmurhash.h +0 -43
  731. package/vendor/librocksdb/vendor/rocksdb/util/mutexlock.h +0 -189
  732. package/vendor/librocksdb/vendor/rocksdb/util/overload.h +0 -23
  733. package/vendor/librocksdb/vendor/rocksdb/util/ppc-opcode.h +0 -27
  734. package/vendor/librocksdb/vendor/rocksdb/util/random.cc +0 -63
  735. package/vendor/librocksdb/vendor/rocksdb/util/random.h +0 -190
  736. package/vendor/librocksdb/vendor/rocksdb/util/rate_limiter.cc +0 -391
  737. package/vendor/librocksdb/vendor/rocksdb/util/rate_limiter_impl.h +0 -156
  738. package/vendor/librocksdb/vendor/rocksdb/util/repeatable_thread.h +0 -149
  739. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_alg.h +0 -1225
  740. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_config.cc +0 -498
  741. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_config.h +0 -182
  742. package/vendor/librocksdb/vendor/rocksdb/util/ribbon_impl.h +0 -1137
  743. package/vendor/librocksdb/vendor/rocksdb/util/set_comparator.h +0 -24
  744. package/vendor/librocksdb/vendor/rocksdb/util/single_thread_executor.h +0 -57
  745. package/vendor/librocksdb/vendor/rocksdb/util/slice.cc +0 -366
  746. package/vendor/librocksdb/vendor/rocksdb/util/status.cc +0 -163
  747. package/vendor/librocksdb/vendor/rocksdb/util/stderr_logger.cc +0 -62
  748. package/vendor/librocksdb/vendor/rocksdb/util/stderr_logger.h +0 -41
  749. package/vendor/librocksdb/vendor/rocksdb/util/stop_watch.h +0 -136
  750. package/vendor/librocksdb/vendor/rocksdb/util/string_util.cc +0 -554
  751. package/vendor/librocksdb/vendor/rocksdb/util/string_util.h +0 -185
  752. package/vendor/librocksdb/vendor/rocksdb/util/thread_guard.h +0 -41
  753. package/vendor/librocksdb/vendor/rocksdb/util/thread_local.cc +0 -521
  754. package/vendor/librocksdb/vendor/rocksdb/util/thread_local.h +0 -100
  755. package/vendor/librocksdb/vendor/rocksdb/util/thread_operation.h +0 -122
  756. package/vendor/librocksdb/vendor/rocksdb/util/threadpool_imp.cc +0 -550
  757. package/vendor/librocksdb/vendor/rocksdb/util/threadpool_imp.h +0 -120
  758. package/vendor/librocksdb/vendor/rocksdb/util/timer.h +0 -340
  759. package/vendor/librocksdb/vendor/rocksdb/util/timer_queue.h +0 -231
  760. package/vendor/librocksdb/vendor/rocksdb/util/udt_util.cc +0 -418
  761. package/vendor/librocksdb/vendor/rocksdb/util/udt_util.h +0 -275
  762. package/vendor/librocksdb/vendor/rocksdb/util/user_comparator_wrapper.h +0 -64
  763. package/vendor/librocksdb/vendor/rocksdb/util/vector_iterator.h +0 -114
  764. package/vendor/librocksdb/vendor/rocksdb/util/work_queue.h +0 -150
  765. package/vendor/librocksdb/vendor/rocksdb/util/write_batch_util.cc +0 -25
  766. package/vendor/librocksdb/vendor/rocksdb/util/write_batch_util.h +0 -90
  767. package/vendor/librocksdb/vendor/rocksdb/util/xxhash.cc +0 -48
  768. package/vendor/librocksdb/vendor/rocksdb/util/xxhash.h +0 -6364
  769. package/vendor/librocksdb/vendor/rocksdb/util/xxph3.h +0 -1760
  770. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/agg_merge.cc +0 -237
  771. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/agg_merge_impl.h +0 -49
  772. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/test_agg_merge.cc +0 -103
  773. package/vendor/librocksdb/vendor/rocksdb/utilities/agg_merge/test_agg_merge.h +0 -47
  774. package/vendor/librocksdb/vendor/rocksdb/utilities/backup/backup_engine.cc +0 -3357
  775. package/vendor/librocksdb/vendor/rocksdb/utilities/backup/backup_engine_impl.h +0 -34
  776. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_compaction_filter.cc +0 -490
  777. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_compaction_filter.h +0 -202
  778. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db.cc +0 -109
  779. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db.h +0 -231
  780. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_gc_stats.h +0 -54
  781. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_impl.cc +0 -2269
  782. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_impl.h +0 -514
  783. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_impl_filesnapshot.cc +0 -127
  784. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_iterator.h +0 -148
  785. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_db_listener.h +0 -71
  786. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_dump_tool.cc +0 -276
  787. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_dump_tool.h +0 -56
  788. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_file.cc +0 -311
  789. package/vendor/librocksdb/vendor/rocksdb/utilities/blob_db/blob_file.h +0 -245
  790. package/vendor/librocksdb/vendor/rocksdb/utilities/cache_dump_load.cc +0 -67
  791. package/vendor/librocksdb/vendor/rocksdb/utilities/cache_dump_load_impl.cc +0 -389
  792. package/vendor/librocksdb/vendor/rocksdb/utilities/cache_dump_load_impl.h +0 -368
  793. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/cassandra_compaction_filter.cc +0 -104
  794. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/cassandra_compaction_filter.h +0 -57
  795. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/cassandra_options.h +0 -41
  796. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/format.cc +0 -365
  797. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/format.h +0 -183
  798. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/merge_operator.cc +0 -76
  799. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/merge_operator.h +0 -43
  800. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/serialize.h +0 -81
  801. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/test_utils.cc +0 -67
  802. package/vendor/librocksdb/vendor/rocksdb/utilities/cassandra/test_utils.h +0 -42
  803. package/vendor/librocksdb/vendor/rocksdb/utilities/checkpoint/checkpoint_impl.cc +0 -472
  804. package/vendor/librocksdb/vendor/rocksdb/utilities/checkpoint/checkpoint_impl.h +0 -64
  805. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters/layered_compaction_filter_base.h +0 -41
  806. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc +0 -24
  807. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.h +0 -26
  808. package/vendor/librocksdb/vendor/rocksdb/utilities/compaction_filters.cc +0 -52
  809. package/vendor/librocksdb/vendor/rocksdb/utilities/convenience/info_log_finder.cc +0 -26
  810. package/vendor/librocksdb/vendor/rocksdb/utilities/counted_fs.cc +0 -379
  811. package/vendor/librocksdb/vendor/rocksdb/utilities/counted_fs.h +0 -158
  812. package/vendor/librocksdb/vendor/rocksdb/utilities/debug.cc +0 -134
  813. package/vendor/librocksdb/vendor/rocksdb/utilities/env_mirror.cc +0 -280
  814. package/vendor/librocksdb/vendor/rocksdb/utilities/env_timed.cc +0 -181
  815. package/vendor/librocksdb/vendor/rocksdb/utilities/env_timed.h +0 -95
  816. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_env.cc +0 -555
  817. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_env.h +0 -252
  818. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_fs.cc +0 -1507
  819. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_fs.h +0 -760
  820. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_secondary_cache.cc +0 -138
  821. package/vendor/librocksdb/vendor/rocksdb/utilities/fault_injection_secondary_cache.h +0 -115
  822. package/vendor/librocksdb/vendor/rocksdb/utilities/leveldb_options/leveldb_options.cc +0 -57
  823. package/vendor/librocksdb/vendor/rocksdb/utilities/memory/memory_util.cc +0 -50
  824. package/vendor/librocksdb/vendor/rocksdb/utilities/memory_allocators.h +0 -103
  825. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/bytesxor.cc +0 -57
  826. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/bytesxor.h +0 -39
  827. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/max.cc +0 -64
  828. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/max_operator.h +0 -35
  829. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/put.cc +0 -74
  830. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/put_operator.h +0 -56
  831. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/sortlist.cc +0 -97
  832. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/sortlist.h +0 -42
  833. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend.cc +0 -76
  834. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend.h +0 -32
  835. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend2.cc +0 -129
  836. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/string_append/stringappend2.h +0 -51
  837. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/uint64add.cc +0 -56
  838. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators/uint64add.h +0 -35
  839. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators.cc +0 -115
  840. package/vendor/librocksdb/vendor/rocksdb/utilities/merge_operators.h +0 -36
  841. package/vendor/librocksdb/vendor/rocksdb/utilities/object_registry.cc +0 -381
  842. package/vendor/librocksdb/vendor/rocksdb/utilities/option_change_migration/option_change_migration.cc +0 -169
  843. package/vendor/librocksdb/vendor/rocksdb/utilities/options/options_util.cc +0 -117
  844. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier.cc +0 -420
  845. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier.h +0 -154
  846. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc +0 -607
  847. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_file.h +0 -291
  848. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_file_buffer.h +0 -127
  849. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.cc +0 -84
  850. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.h +0 -122
  851. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/hash_table.h +0 -237
  852. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/hash_table_bench.cc +0 -310
  853. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/hash_table_evictable.h +0 -166
  854. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/lrulist.h +0 -172
  855. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_bench.cc +0 -355
  856. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_test.h +0 -284
  857. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_tier.cc +0 -165
  858. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_tier.h +0 -340
  859. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/persistent_cache_util.h +0 -67
  860. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc +0 -138
  861. package/vendor/librocksdb/vendor/rocksdb/utilities/persistent_cache/volatile_tier_impl.h +0 -139
  862. package/vendor/librocksdb/vendor/rocksdb/utilities/simulator_cache/cache_simulator.cc +0 -287
  863. package/vendor/librocksdb/vendor/rocksdb/utilities/simulator_cache/cache_simulator.h +0 -231
  864. package/vendor/librocksdb/vendor/rocksdb/utilities/simulator_cache/sim_cache.cc +0 -375
  865. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_for_tiering_collector.cc +0 -144
  866. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_for_tiering_collector.h +0 -45
  867. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.cc +0 -233
  868. package/vendor/librocksdb/vendor/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.h +0 -65
  869. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/file_trace_reader_writer.cc +0 -132
  870. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/file_trace_reader_writer.h +0 -48
  871. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/replayer_impl.cc +0 -313
  872. package/vendor/librocksdb/vendor/rocksdb/utilities/trace/replayer_impl.h +0 -84
  873. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/lock_manager.cc +0 -27
  874. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/lock_manager.h +0 -80
  875. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/lock_tracker.h +0 -207
  876. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_manager.cc +0 -718
  877. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_manager.h +0 -222
  878. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_manager_test.h +0 -324
  879. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_tracker.cc +0 -255
  880. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/point/point_lock_tracker.h +0 -97
  881. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_lock_manager.h +0 -34
  882. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/db.h +0 -81
  883. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/ft/comparator.h +0 -138
  884. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/ft/ft-status.h +0 -102
  885. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/concurrent_tree.cc +0 -137
  886. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/concurrent_tree.h +0 -174
  887. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/keyrange.cc +0 -220
  888. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/keyrange.h +0 -141
  889. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.cc +0 -525
  890. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.h +0 -255
  891. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/locktree.cc +0 -1021
  892. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/locktree.h +0 -580
  893. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/manager.cc +0 -525
  894. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/range_buffer.cc +0 -263
  895. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/range_buffer.h +0 -178
  896. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/treenode.cc +0 -518
  897. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/treenode.h +0 -302
  898. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/txnid_set.cc +0 -118
  899. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/txnid_set.h +0 -92
  900. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/wfg.cc +0 -211
  901. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/wfg.h +0 -124
  902. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/memory.h +0 -215
  903. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_assert_subst.h +0 -43
  904. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h +0 -130
  905. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_external_pthread.h +0 -87
  906. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_instrumentation.h +0 -286
  907. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_portability.h +0 -87
  908. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_pthread.h +0 -520
  909. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_race_tools.h +0 -179
  910. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +0 -197
  911. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/txn_subst.h +0 -31
  912. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/standalone_port.cc +0 -139
  913. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/dbt.cc +0 -165
  914. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/dbt.h +0 -98
  915. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/growable_array.h +0 -144
  916. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/memarena.cc +0 -199
  917. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/memarena.h +0 -141
  918. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/omt.h +0 -794
  919. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/omt_impl.h +0 -1295
  920. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/partitioned_counter.h +0 -165
  921. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/status.h +0 -76
  922. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc +0 -501
  923. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.h +0 -135
  924. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_tracker.cc +0 -156
  925. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_tracker.h +0 -146
  926. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction.cc +0 -208
  927. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction.h +0 -99
  928. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction_db_impl.cc +0 -111
  929. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/optimistic_transaction_db_impl.h +0 -110
  930. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction.cc +0 -1278
  931. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction.h +0 -345
  932. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction_db.cc +0 -845
  933. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/pessimistic_transaction_db.h +0 -345
  934. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/snapshot_checker.cc +0 -37
  935. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_base.cc +0 -912
  936. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_base.h +0 -455
  937. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_db_mutex_impl.cc +0 -133
  938. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_db_mutex_impl.h +0 -24
  939. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_test.h +0 -589
  940. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_util.cc +0 -207
  941. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/transaction_util.h +0 -86
  942. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn.cc +0 -548
  943. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn.h +0 -118
  944. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn_db.cc +0 -1100
  945. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_prepared_txn_db.h +0 -1149
  946. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn.cc +0 -1089
  947. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn.h +0 -333
  948. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn_db.cc +0 -486
  949. package/vendor/librocksdb/vendor/rocksdb/utilities/transactions/write_unprepared_txn_db.h +0 -105
  950. package/vendor/librocksdb/vendor/rocksdb/utilities/ttl/db_ttl_impl.cc +0 -638
  951. package/vendor/librocksdb/vendor/rocksdb/utilities/ttl/db_ttl_impl.h +0 -239
  952. package/vendor/librocksdb/vendor/rocksdb/utilities/types_util.cc +0 -88
  953. package/vendor/librocksdb/vendor/rocksdb/utilities/wal_filter.cc +0 -22
  954. package/vendor/librocksdb/vendor/rocksdb/utilities/write_batch_with_index/write_batch_with_index.cc +0 -1134
  955. package/vendor/librocksdb/vendor/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.cc +0 -934
  956. package/vendor/librocksdb/vendor/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.h +0 -468
@@ -1,2148 +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
-
10
- #include "table/block_based/block_based_table_builder.h"
11
-
12
- #include <atomic>
13
- #include <cassert>
14
- #include <cstdio>
15
- #include <list>
16
- #include <map>
17
- #include <memory>
18
- #include <numeric>
19
- #include <string>
20
- #include <unordered_map>
21
- #include <utility>
22
-
23
- #include "block_cache.h"
24
- #include "cache/cache_entry_roles.h"
25
- #include "cache/cache_helpers.h"
26
- #include "cache/cache_key.h"
27
- #include "cache/cache_reservation_manager.h"
28
- #include "db/dbformat.h"
29
- #include "index_builder.h"
30
- #include "logging/logging.h"
31
- #include "memory/memory_allocator_impl.h"
32
- #include "rocksdb/cache.h"
33
- #include "rocksdb/comparator.h"
34
- #include "rocksdb/env.h"
35
- #include "rocksdb/filter_policy.h"
36
- #include "rocksdb/flush_block_policy.h"
37
- #include "rocksdb/merge_operator.h"
38
- #include "rocksdb/table.h"
39
- #include "rocksdb/types.h"
40
- #include "table/block_based/block.h"
41
- #include "table/block_based/block_based_table_factory.h"
42
- #include "table/block_based/block_based_table_reader.h"
43
- #include "table/block_based/block_builder.h"
44
- #include "table/block_based/filter_block.h"
45
- #include "table/block_based/filter_policy_internal.h"
46
- #include "table/block_based/full_filter_block.h"
47
- #include "table/block_based/partitioned_filter_block.h"
48
- #include "table/format.h"
49
- #include "table/meta_blocks.h"
50
- #include "table/table_builder.h"
51
- #include "util/coding.h"
52
- #include "util/compression.h"
53
- #include "util/stop_watch.h"
54
- #include "util/string_util.h"
55
- #include "util/work_queue.h"
56
-
57
- namespace ROCKSDB_NAMESPACE {
58
-
59
- extern const std::string kHashIndexPrefixesBlock;
60
- extern const std::string kHashIndexPrefixesMetadataBlock;
61
-
62
- // Without anonymous namespace here, we fail the warning -Wmissing-prototypes
63
- namespace {
64
-
65
- constexpr size_t kBlockTrailerSize = BlockBasedTable::kBlockTrailerSize;
66
-
67
- // Create a filter block builder based on its type.
68
- FilterBlockBuilder* CreateFilterBlockBuilder(
69
- const ImmutableCFOptions& /*opt*/, const MutableCFOptions& mopt,
70
- const FilterBuildingContext& context,
71
- const bool use_delta_encoding_for_index_values,
72
- PartitionedIndexBuilder* const p_index_builder, size_t ts_sz,
73
- const bool persist_user_defined_timestamps) {
74
- const BlockBasedTableOptions& table_opt = context.table_options;
75
- assert(table_opt.filter_policy); // precondition
76
-
77
- FilterBitsBuilder* filter_bits_builder =
78
- BloomFilterPolicy::GetBuilderFromContext(context);
79
- if (filter_bits_builder == nullptr) {
80
- return nullptr;
81
- } else {
82
- if (table_opt.partition_filters) {
83
- assert(p_index_builder != nullptr);
84
- // Since after partition cut request from filter builder it takes time
85
- // until index builder actully cuts the partition, until the end of a
86
- // data block potentially with many keys, we take the lower bound as
87
- // partition size.
88
- assert(table_opt.block_size_deviation <= 100);
89
- auto partition_size =
90
- static_cast<uint32_t>(((table_opt.metadata_block_size *
91
- (100 - table_opt.block_size_deviation)) +
92
- 99) /
93
- 100);
94
- partition_size = std::max(partition_size, static_cast<uint32_t>(1));
95
- return new PartitionedFilterBlockBuilder(
96
- mopt.prefix_extractor.get(), table_opt.whole_key_filtering,
97
- filter_bits_builder, table_opt.index_block_restart_interval,
98
- use_delta_encoding_for_index_values, p_index_builder, partition_size,
99
- ts_sz, persist_user_defined_timestamps);
100
- } else {
101
- return new FullFilterBlockBuilder(mopt.prefix_extractor.get(),
102
- table_opt.whole_key_filtering,
103
- filter_bits_builder);
104
- }
105
- }
106
- }
107
-
108
- bool GoodCompressionRatio(size_t compressed_size, size_t uncomp_size,
109
- int max_compressed_bytes_per_kb) {
110
- // For efficiency, avoid floating point and division
111
- return compressed_size <=
112
- (static_cast<uint64_t>(max_compressed_bytes_per_kb) * uncomp_size) >>
113
- 10;
114
- }
115
-
116
- } // namespace
117
-
118
- // format_version is the block format as defined in include/rocksdb/table.h
119
- Slice CompressBlock(const Slice& uncompressed_data, const CompressionInfo& info,
120
- CompressionType* type, uint32_t format_version,
121
- bool allow_sample, std::string* compressed_output,
122
- std::string* sampled_output_fast,
123
- std::string* sampled_output_slow) {
124
- assert(type);
125
- assert(compressed_output);
126
- assert(compressed_output->empty());
127
-
128
- // If requested, we sample one in every N block with a
129
- // fast and slow compression algorithm and report the stats.
130
- // The users can use these stats to decide if it is worthwhile
131
- // enabling compression and they also get a hint about which
132
- // compression algorithm wil be beneficial.
133
- if (allow_sample && info.SampleForCompression() &&
134
- Random::GetTLSInstance()->OneIn(
135
- static_cast<int>(info.SampleForCompression()))) {
136
- // Sampling with a fast compression algorithm
137
- if (sampled_output_fast && (LZ4_Supported() || Snappy_Supported())) {
138
- CompressionType c =
139
- LZ4_Supported() ? kLZ4Compression : kSnappyCompression;
140
- CompressionOptions options;
141
- CompressionContext context(c, options);
142
- CompressionInfo info_tmp(options, context,
143
- CompressionDict::GetEmptyDict(), c,
144
- info.SampleForCompression());
145
-
146
- CompressData(uncompressed_data, info_tmp,
147
- GetCompressFormatForVersion(format_version),
148
- sampled_output_fast);
149
- }
150
-
151
- // Sampling with a slow but high-compression algorithm
152
- if (sampled_output_slow && (ZSTD_Supported() || Zlib_Supported())) {
153
- CompressionType c = ZSTD_Supported() ? kZSTD : kZlibCompression;
154
- CompressionOptions options;
155
- CompressionContext context(c, options);
156
- CompressionInfo info_tmp(options, context,
157
- CompressionDict::GetEmptyDict(), c,
158
- info.SampleForCompression());
159
-
160
- CompressData(uncompressed_data, info_tmp,
161
- GetCompressFormatForVersion(format_version),
162
- sampled_output_slow);
163
- }
164
- }
165
-
166
- int max_compressed_bytes_per_kb = info.options().max_compressed_bytes_per_kb;
167
- if (info.type() == kNoCompression || max_compressed_bytes_per_kb <= 0) {
168
- *type = kNoCompression;
169
- return uncompressed_data;
170
- }
171
-
172
- // Actually compress the data; if the compression method is not supported,
173
- // or the compression fails etc., just fall back to uncompressed
174
- if (!CompressData(uncompressed_data, info,
175
- GetCompressFormatForVersion(format_version),
176
- compressed_output)) {
177
- *type = kNoCompression;
178
- return uncompressed_data;
179
- }
180
-
181
- // Check the compression ratio; if it's not good enough, just fall back to
182
- // uncompressed
183
- if (!GoodCompressionRatio(compressed_output->size(), uncompressed_data.size(),
184
- max_compressed_bytes_per_kb)) {
185
- *type = kNoCompression;
186
- return uncompressed_data;
187
- }
188
-
189
- *type = info.type();
190
- return *compressed_output;
191
- }
192
-
193
- // kBlockBasedTableMagicNumber was picked by running
194
- // echo rocksdb.table.block_based | sha1sum
195
- // and taking the leading 64 bits.
196
- // Please note that kBlockBasedTableMagicNumber may also be accessed by other
197
- // .cc files
198
- // for that reason we declare it extern in the header but to get the space
199
- // allocated
200
- // it must be not extern in one place.
201
- const uint64_t kBlockBasedTableMagicNumber = 0x88e241b785f4cff7ull;
202
- // We also support reading and writing legacy block based table format (for
203
- // backwards compatibility)
204
- const uint64_t kLegacyBlockBasedTableMagicNumber = 0xdb4775248b80fb57ull;
205
-
206
- // A collector that collects properties of interest to block-based table.
207
- // For now this class looks heavy-weight since we only write one additional
208
- // property.
209
- // But in the foreseeable future, we will add more and more properties that are
210
- // specific to block-based table.
211
- class BlockBasedTableBuilder::BlockBasedTablePropertiesCollector
212
- : public InternalTblPropColl {
213
- public:
214
- explicit BlockBasedTablePropertiesCollector(
215
- BlockBasedTableOptions::IndexType index_type, bool whole_key_filtering,
216
- bool prefix_filtering)
217
- : index_type_(index_type),
218
- whole_key_filtering_(whole_key_filtering),
219
- prefix_filtering_(prefix_filtering) {}
220
-
221
- Status InternalAdd(const Slice& /*key*/, const Slice& /*value*/,
222
- uint64_t /*file_size*/) override {
223
- // Intentionally left blank. Have no interest in collecting stats for
224
- // individual key/value pairs.
225
- return Status::OK();
226
- }
227
-
228
- void BlockAdd(uint64_t /* block_uncomp_bytes */,
229
- uint64_t /* block_compressed_bytes_fast */,
230
- uint64_t /* block_compressed_bytes_slow */) override {
231
- // Intentionally left blank. No interest in collecting stats for
232
- // blocks.
233
- }
234
-
235
- Status Finish(UserCollectedProperties* properties) override {
236
- std::string val;
237
- PutFixed32(&val, static_cast<uint32_t>(index_type_));
238
- properties->insert({BlockBasedTablePropertyNames::kIndexType, val});
239
- properties->insert({BlockBasedTablePropertyNames::kWholeKeyFiltering,
240
- whole_key_filtering_ ? kPropTrue : kPropFalse});
241
- properties->insert({BlockBasedTablePropertyNames::kPrefixFiltering,
242
- prefix_filtering_ ? kPropTrue : kPropFalse});
243
- return Status::OK();
244
- }
245
-
246
- // The name of the properties collector can be used for debugging purpose.
247
- const char* Name() const override {
248
- return "BlockBasedTablePropertiesCollector";
249
- }
250
-
251
- UserCollectedProperties GetReadableProperties() const override {
252
- // Intentionally left blank.
253
- return UserCollectedProperties();
254
- }
255
-
256
- private:
257
- BlockBasedTableOptions::IndexType index_type_;
258
- bool whole_key_filtering_;
259
- bool prefix_filtering_;
260
- };
261
-
262
- struct BlockBasedTableBuilder::Rep {
263
- const ImmutableOptions ioptions;
264
- // BEGIN from MutableCFOptions
265
- std::shared_ptr<const SliceTransform> prefix_extractor;
266
- // END from MutableCFOptions
267
- const WriteOptions write_options;
268
- const BlockBasedTableOptions table_options;
269
- const InternalKeyComparator& internal_comparator;
270
- // Size in bytes for the user-defined timestamps.
271
- size_t ts_sz;
272
- // When `ts_sz` > 0 and this flag is false, the user-defined timestamp in the
273
- // user key will be stripped when creating the block based table. This
274
- // stripping happens for all user keys, including the keys in data block,
275
- // index block for data block, index block for index block (if index type is
276
- // `kTwoLevelIndexSearch`), index for filter blocks (if using partitioned
277
- // filters), the `first_internal_key` in `IndexValue`, the `end_key` for range
278
- // deletion entries.
279
- // As long as the user keys are sorted when added via `Add` API, their logic
280
- // ordering won't change after timestamps are stripped. However, for each user
281
- // key to be logically equivalent before and after timestamp is stripped, the
282
- // user key should contain the minimum timestamp.
283
- bool persist_user_defined_timestamps;
284
- WritableFileWriter* file;
285
- std::atomic<uint64_t> offset;
286
- size_t alignment;
287
- BlockBuilder data_block;
288
- // Buffers uncompressed data blocks to replay later. Needed when
289
- // compression dictionary is enabled so we can finalize the dictionary before
290
- // compressing any data blocks.
291
- std::vector<std::string> data_block_buffers;
292
- BlockBuilder range_del_block;
293
-
294
- InternalKeySliceTransform internal_prefix_transform;
295
- std::unique_ptr<IndexBuilder> index_builder;
296
- std::string index_separator_scratch;
297
- PartitionedIndexBuilder* p_index_builder_ = nullptr;
298
-
299
- std::string last_ikey; // Internal key or empty (unset)
300
- const Slice* first_key_in_next_block = nullptr;
301
- CompressionType compression_type;
302
- uint64_t sample_for_compression;
303
- std::atomic<uint64_t> compressible_input_data_bytes;
304
- std::atomic<uint64_t> uncompressible_input_data_bytes;
305
- std::atomic<uint64_t> sampled_input_data_bytes;
306
- std::atomic<uint64_t> sampled_output_slow_data_bytes;
307
- std::atomic<uint64_t> sampled_output_fast_data_bytes;
308
- CompressionOptions compression_opts;
309
- std::unique_ptr<CompressionDict> compression_dict;
310
- std::vector<std::unique_ptr<CompressionContext>> compression_ctxs;
311
- std::vector<std::unique_ptr<UncompressionContext>> verify_ctxs;
312
- std::unique_ptr<UncompressionDict> verify_dict;
313
-
314
- size_t data_begin_offset = 0;
315
-
316
- TableProperties props;
317
-
318
- // States of the builder.
319
- //
320
- // - `kBuffered`: This is the initial state where zero or more data blocks are
321
- // accumulated uncompressed in-memory. From this state, call
322
- // `EnterUnbuffered()` to finalize the compression dictionary if enabled,
323
- // compress/write out any buffered blocks, and proceed to the `kUnbuffered`
324
- // state.
325
- //
326
- // - `kUnbuffered`: This is the state when compression dictionary is finalized
327
- // either because it wasn't enabled in the first place or it's been created
328
- // from sampling previously buffered data. In this state, blocks are simply
329
- // compressed/written out as they fill up. From this state, call `Finish()`
330
- // to complete the file (write meta-blocks, etc.), or `Abandon()` to delete
331
- // the partially created file.
332
- //
333
- // - `kClosed`: This indicates either `Finish()` or `Abandon()` has been
334
- // called, so the table builder is no longer usable. We must be in this
335
- // state by the time the destructor runs.
336
- enum class State {
337
- kBuffered,
338
- kUnbuffered,
339
- kClosed,
340
- };
341
- State state;
342
- // `kBuffered` state is allowed only as long as the buffering of uncompressed
343
- // data blocks (see `data_block_buffers`) does not exceed `buffer_limit`.
344
- uint64_t buffer_limit;
345
- std::shared_ptr<CacheReservationManager>
346
- compression_dict_buffer_cache_res_mgr;
347
- const bool use_delta_encoding_for_index_values;
348
- std::unique_ptr<FilterBlockBuilder> filter_builder;
349
- OffsetableCacheKey base_cache_key;
350
- const TableFileCreationReason reason;
351
-
352
- BlockHandle pending_handle; // Handle to add to index block
353
-
354
- std::string compressed_output;
355
- std::unique_ptr<FlushBlockPolicy> flush_block_policy;
356
-
357
- std::vector<std::unique_ptr<InternalTblPropColl>> table_properties_collectors;
358
-
359
- std::unique_ptr<ParallelCompressionRep> pc_rep;
360
- BlockCreateContext create_context;
361
-
362
- // The size of the "tail" part of a SST file. "Tail" refers to
363
- // all blocks after data blocks till the end of the SST file.
364
- uint64_t tail_size;
365
-
366
- // See class Footer
367
- uint32_t base_context_checksum;
368
-
369
- uint64_t get_offset() { return offset.load(std::memory_order_relaxed); }
370
- void set_offset(uint64_t o) { offset.store(o, std::memory_order_relaxed); }
371
-
372
- bool IsParallelCompressionEnabled() const {
373
- return compression_opts.parallel_threads > 1;
374
- }
375
-
376
- Status GetStatus() {
377
- // We need to make modifications of status visible when status_ok is set
378
- // to false, and this is ensured by status_mutex, so no special memory
379
- // order for status_ok is required.
380
- if (status_ok.load(std::memory_order_relaxed)) {
381
- return Status::OK();
382
- } else {
383
- return CopyStatus();
384
- }
385
- }
386
-
387
- Status CopyStatus() {
388
- std::lock_guard<std::mutex> lock(status_mutex);
389
- return status;
390
- }
391
-
392
- IOStatus GetIOStatus() {
393
- // We need to make modifications of io_status visible when status_ok is set
394
- // to false, and this is ensured by io_status_mutex, so no special memory
395
- // order for io_status_ok is required.
396
- if (io_status_ok.load(std::memory_order_relaxed)) {
397
- #ifdef ROCKSDB_ASSERT_STATUS_CHECKED // Avoid unnecessary lock acquisition
398
- auto ios = CopyIOStatus();
399
- ios.PermitUncheckedError();
400
- // Assume no races in unit tests
401
- assert(ios.ok());
402
- #endif // ROCKSDB_ASSERT_STATUS_CHECKED
403
- return IOStatus::OK();
404
- } else {
405
- return CopyIOStatus();
406
- }
407
- }
408
-
409
- IOStatus CopyIOStatus() {
410
- std::lock_guard<std::mutex> lock(io_status_mutex);
411
- return io_status;
412
- }
413
-
414
- // Never erase an existing status that is not OK.
415
- void SetStatus(Status s) {
416
- if (!s.ok() && status_ok.load(std::memory_order_relaxed)) {
417
- // Locking is an overkill for non compression_opts.parallel_threads
418
- // case but since it's unlikely that s is not OK, we take this cost
419
- // to be simplicity.
420
- std::lock_guard<std::mutex> lock(status_mutex);
421
- status = s;
422
- status_ok.store(false, std::memory_order_relaxed);
423
- }
424
- }
425
-
426
- // Never erase an existing I/O status that is not OK.
427
- // Calling this will also SetStatus(ios)
428
- void SetIOStatus(IOStatus ios) {
429
- if (!ios.ok() && io_status_ok.load(std::memory_order_relaxed)) {
430
- // Locking is an overkill for non compression_opts.parallel_threads
431
- // case but since it's unlikely that s is not OK, we take this cost
432
- // to be simplicity.
433
- std::lock_guard<std::mutex> lock(io_status_mutex);
434
- io_status = ios;
435
- io_status_ok.store(false, std::memory_order_relaxed);
436
- }
437
- SetStatus(ios);
438
- }
439
-
440
- Rep(const BlockBasedTableOptions& table_opt, const TableBuilderOptions& tbo,
441
- WritableFileWriter* f)
442
- : ioptions(tbo.ioptions),
443
- prefix_extractor(tbo.moptions.prefix_extractor),
444
- write_options(tbo.write_options),
445
- table_options(table_opt),
446
- internal_comparator(tbo.internal_comparator),
447
- ts_sz(tbo.internal_comparator.user_comparator()->timestamp_size()),
448
- persist_user_defined_timestamps(
449
- tbo.ioptions.persist_user_defined_timestamps),
450
- file(f),
451
- offset(0),
452
- alignment(table_options.block_align
453
- ? std::min(static_cast<size_t>(table_options.block_size),
454
- kDefaultPageSize)
455
- : 0),
456
- data_block(table_options.block_restart_interval,
457
- table_options.use_delta_encoding,
458
- false /* use_value_delta_encoding */,
459
- tbo.internal_comparator.user_comparator()
460
- ->CanKeysWithDifferentByteContentsBeEqual()
461
- ? BlockBasedTableOptions::kDataBlockBinarySearch
462
- : table_options.data_block_index_type,
463
- table_options.data_block_hash_table_util_ratio, ts_sz,
464
- persist_user_defined_timestamps),
465
- range_del_block(
466
- 1 /* block_restart_interval */, true /* use_delta_encoding */,
467
- false /* use_value_delta_encoding */,
468
- BlockBasedTableOptions::kDataBlockBinarySearch /* index_type */,
469
- 0.75 /* data_block_hash_table_util_ratio */, ts_sz,
470
- persist_user_defined_timestamps),
471
- internal_prefix_transform(prefix_extractor.get()),
472
- compression_type(tbo.compression_type),
473
- sample_for_compression(tbo.moptions.sample_for_compression),
474
- compressible_input_data_bytes(0),
475
- uncompressible_input_data_bytes(0),
476
- sampled_input_data_bytes(0),
477
- sampled_output_slow_data_bytes(0),
478
- sampled_output_fast_data_bytes(0),
479
- compression_opts(tbo.compression_opts),
480
- compression_dict(),
481
- compression_ctxs(tbo.compression_opts.parallel_threads),
482
- verify_ctxs(tbo.compression_opts.parallel_threads),
483
- verify_dict(),
484
- state((tbo.compression_opts.max_dict_bytes > 0 &&
485
- tbo.compression_type != kNoCompression)
486
- ? State::kBuffered
487
- : State::kUnbuffered),
488
- use_delta_encoding_for_index_values(table_opt.format_version >= 4 &&
489
- !table_opt.block_align),
490
- reason(tbo.reason),
491
- flush_block_policy(
492
- table_options.flush_block_policy_factory->NewFlushBlockPolicy(
493
- table_options, data_block)),
494
- create_context(&table_options, &ioptions, ioptions.stats,
495
- compression_type == kZSTD ||
496
- compression_type == kZSTDNotFinalCompression,
497
- tbo.moptions.block_protection_bytes_per_key,
498
- tbo.internal_comparator.user_comparator(),
499
- !use_delta_encoding_for_index_values,
500
- table_opt.index_type ==
501
- BlockBasedTableOptions::kBinarySearchWithFirstKey),
502
- tail_size(0),
503
- status_ok(true),
504
- io_status_ok(true) {
505
- if (tbo.target_file_size == 0) {
506
- buffer_limit = compression_opts.max_dict_buffer_bytes;
507
- } else if (compression_opts.max_dict_buffer_bytes == 0) {
508
- buffer_limit = tbo.target_file_size;
509
- } else {
510
- buffer_limit = std::min(tbo.target_file_size,
511
- compression_opts.max_dict_buffer_bytes);
512
- }
513
-
514
- const auto compress_dict_build_buffer_charged =
515
- table_options.cache_usage_options.options_overrides
516
- .at(CacheEntryRole::kCompressionDictionaryBuildingBuffer)
517
- .charged;
518
- if (table_options.block_cache &&
519
- (compress_dict_build_buffer_charged ==
520
- CacheEntryRoleOptions::Decision::kEnabled ||
521
- compress_dict_build_buffer_charged ==
522
- CacheEntryRoleOptions::Decision::kFallback)) {
523
- compression_dict_buffer_cache_res_mgr =
524
- std::make_shared<CacheReservationManagerImpl<
525
- CacheEntryRole::kCompressionDictionaryBuildingBuffer>>(
526
- table_options.block_cache);
527
- } else {
528
- compression_dict_buffer_cache_res_mgr = nullptr;
529
- }
530
-
531
- assert(compression_ctxs.size() >= compression_opts.parallel_threads);
532
- for (uint32_t i = 0; i < compression_opts.parallel_threads; i++) {
533
- compression_ctxs[i].reset(
534
- new CompressionContext(compression_type, compression_opts));
535
- }
536
- if (table_options.index_type ==
537
- BlockBasedTableOptions::kTwoLevelIndexSearch) {
538
- p_index_builder_ = PartitionedIndexBuilder::CreateIndexBuilder(
539
- &internal_comparator, use_delta_encoding_for_index_values,
540
- table_options, ts_sz, persist_user_defined_timestamps);
541
- index_builder.reset(p_index_builder_);
542
- } else {
543
- index_builder.reset(IndexBuilder::CreateIndexBuilder(
544
- table_options.index_type, &internal_comparator,
545
- &this->internal_prefix_transform, use_delta_encoding_for_index_values,
546
- table_options, ts_sz, persist_user_defined_timestamps));
547
- }
548
- if (ioptions.optimize_filters_for_hits && tbo.is_bottommost) {
549
- // Apply optimize_filters_for_hits setting here when applicable by
550
- // skipping filter generation
551
- filter_builder.reset();
552
- } else if (tbo.skip_filters) {
553
- // For SstFileWriter skip_filters
554
- filter_builder.reset();
555
- } else if (!table_options.filter_policy) {
556
- // Null filter_policy -> no filter
557
- filter_builder.reset();
558
- } else {
559
- FilterBuildingContext filter_context(table_options);
560
-
561
- filter_context.info_log = ioptions.logger;
562
- filter_context.column_family_name = tbo.column_family_name;
563
- filter_context.reason = reason;
564
-
565
- // Only populate other fields if known to be in LSM rather than
566
- // generating external SST file
567
- if (reason != TableFileCreationReason::kMisc) {
568
- filter_context.compaction_style = ioptions.compaction_style;
569
- filter_context.num_levels = ioptions.num_levels;
570
- filter_context.level_at_creation = tbo.level_at_creation;
571
- filter_context.is_bottommost = tbo.is_bottommost;
572
- assert(filter_context.level_at_creation < filter_context.num_levels);
573
- }
574
-
575
- filter_builder.reset(CreateFilterBlockBuilder(
576
- ioptions, tbo.moptions, filter_context,
577
- use_delta_encoding_for_index_values, p_index_builder_, ts_sz,
578
- persist_user_defined_timestamps));
579
- }
580
-
581
- assert(tbo.internal_tbl_prop_coll_factories);
582
- for (auto& factory : *tbo.internal_tbl_prop_coll_factories) {
583
- assert(factory);
584
-
585
- std::unique_ptr<InternalTblPropColl> collector{
586
- factory->CreateInternalTblPropColl(
587
- tbo.column_family_id, tbo.level_at_creation,
588
- tbo.ioptions.num_levels,
589
- tbo.last_level_inclusive_max_seqno_threshold)};
590
- if (collector) {
591
- table_properties_collectors.emplace_back(std::move(collector));
592
- }
593
- }
594
- table_properties_collectors.emplace_back(
595
- new BlockBasedTablePropertiesCollector(
596
- table_options.index_type, table_options.whole_key_filtering,
597
- prefix_extractor != nullptr));
598
- if (ts_sz > 0 && persist_user_defined_timestamps) {
599
- table_properties_collectors.emplace_back(
600
- new TimestampTablePropertiesCollector(
601
- tbo.internal_comparator.user_comparator()));
602
- }
603
- if (table_options.verify_compression) {
604
- for (uint32_t i = 0; i < compression_opts.parallel_threads; i++) {
605
- verify_ctxs[i].reset(new UncompressionContext(compression_type));
606
- }
607
- }
608
-
609
- // These are only needed for populating table properties
610
- props.column_family_id = tbo.column_family_id;
611
- props.column_family_name = tbo.column_family_name;
612
- props.oldest_key_time = tbo.oldest_key_time;
613
- props.file_creation_time = tbo.file_creation_time;
614
- props.orig_file_number = tbo.cur_file_num;
615
- props.db_id = tbo.db_id;
616
- props.db_session_id = tbo.db_session_id;
617
- props.db_host_id = ioptions.db_host_id;
618
- if (!ReifyDbHostIdProperty(ioptions.env, &props.db_host_id).ok()) {
619
- ROCKS_LOG_INFO(ioptions.logger, "db_host_id property will not be set");
620
- }
621
-
622
- if (FormatVersionUsesContextChecksum(table_options.format_version)) {
623
- // Must be non-zero and semi- or quasi-random
624
- // TODO: ideally guaranteed different for related files (e.g. use file
625
- // number and db_session, for benefit of SstFileWriter)
626
- do {
627
- base_context_checksum = Random::GetTLSInstance()->Next();
628
- } while (UNLIKELY(base_context_checksum == 0));
629
- } else {
630
- base_context_checksum = 0;
631
- }
632
-
633
- if (alignment > 0 && compression_type != kNoCompression) {
634
- // With better sanitization in `CompactionPicker::CompactFiles()`, we
635
- // would not need to handle this case here and could change it to an
636
- // assertion instead.
637
- SetStatus(Status::InvalidArgument(
638
- "Enable block_align, but compression enabled"));
639
- }
640
- }
641
-
642
- Rep(const Rep&) = delete;
643
- Rep& operator=(const Rep&) = delete;
644
-
645
- private:
646
- // Synchronize status & io_status accesses across threads from main thread,
647
- // compression thread and write thread in parallel compression.
648
- std::mutex status_mutex;
649
- std::atomic<bool> status_ok;
650
- Status status;
651
- std::mutex io_status_mutex;
652
- std::atomic<bool> io_status_ok;
653
- IOStatus io_status;
654
- };
655
-
656
- struct BlockBasedTableBuilder::ParallelCompressionRep {
657
- // Keys is a wrapper of vector of strings avoiding
658
- // releasing string memories during vector clear()
659
- // in order to save memory allocation overhead
660
- class Keys {
661
- public:
662
- Keys() : keys_(kKeysInitSize), size_(0) {}
663
- void PushBack(const Slice& key) {
664
- if (size_ == keys_.size()) {
665
- keys_.emplace_back(key.data(), key.size());
666
- } else {
667
- keys_[size_].assign(key.data(), key.size());
668
- }
669
- size_++;
670
- }
671
- void SwapAssign(std::vector<std::string>& keys) {
672
- size_ = keys.size();
673
- std::swap(keys_, keys);
674
- }
675
- void Clear() { size_ = 0; }
676
- size_t Size() { return size_; }
677
- std::string& Back() { return keys_[size_ - 1]; }
678
- std::string& operator[](size_t idx) {
679
- assert(idx < size_);
680
- return keys_[idx];
681
- }
682
-
683
- private:
684
- const size_t kKeysInitSize = 32;
685
- std::vector<std::string> keys_;
686
- size_t size_;
687
- };
688
- std::unique_ptr<Keys> curr_block_keys;
689
-
690
- class BlockRepSlot;
691
-
692
- // BlockRep instances are fetched from and recycled to
693
- // block_rep_pool during parallel compression.
694
- struct BlockRep {
695
- Slice contents;
696
- Slice compressed_contents;
697
- std::unique_ptr<std::string> data;
698
- std::unique_ptr<std::string> compressed_data;
699
- CompressionType compression_type;
700
- std::unique_ptr<std::string> first_key_in_next_block;
701
- std::unique_ptr<Keys> keys;
702
- std::unique_ptr<BlockRepSlot> slot;
703
- Status status;
704
- };
705
- // Use a vector of BlockRep as a buffer for a determined number
706
- // of BlockRep structures. All data referenced by pointers in
707
- // BlockRep will be freed when this vector is destructed.
708
- using BlockRepBuffer = std::vector<BlockRep>;
709
- BlockRepBuffer block_rep_buf;
710
- // Use a thread-safe queue for concurrent access from block
711
- // building thread and writer thread.
712
- using BlockRepPool = WorkQueue<BlockRep*>;
713
- BlockRepPool block_rep_pool;
714
-
715
- // Use BlockRepSlot to keep block order in write thread.
716
- // slot_ will pass references to BlockRep
717
- class BlockRepSlot {
718
- public:
719
- BlockRepSlot() : slot_(1) {}
720
- template <typename T>
721
- void Fill(T&& rep) {
722
- slot_.push(std::forward<T>(rep));
723
- }
724
- void Take(BlockRep*& rep) { slot_.pop(rep); }
725
-
726
- private:
727
- // slot_ will pass references to BlockRep in block_rep_buf,
728
- // and those references are always valid before the destruction of
729
- // block_rep_buf.
730
- WorkQueue<BlockRep*> slot_;
731
- };
732
-
733
- // Compression queue will pass references to BlockRep in block_rep_buf,
734
- // and those references are always valid before the destruction of
735
- // block_rep_buf.
736
- using CompressQueue = WorkQueue<BlockRep*>;
737
- CompressQueue compress_queue;
738
- std::vector<port::Thread> compress_thread_pool;
739
-
740
- // Write queue will pass references to BlockRep::slot in block_rep_buf,
741
- // and those references are always valid before the corresponding
742
- // BlockRep::slot is destructed, which is before the destruction of
743
- // block_rep_buf.
744
- using WriteQueue = WorkQueue<BlockRepSlot*>;
745
- WriteQueue write_queue;
746
- std::unique_ptr<port::Thread> write_thread;
747
-
748
- // Estimate output file size when parallel compression is enabled. This is
749
- // necessary because compression & flush are no longer synchronized,
750
- // and BlockBasedTableBuilder::FileSize() is no longer accurate.
751
- // memory_order_relaxed suffices because accurate statistics is not required.
752
- class FileSizeEstimator {
753
- public:
754
- explicit FileSizeEstimator()
755
- : uncomp_bytes_compressed(0),
756
- uncomp_bytes_curr_block(0),
757
- uncomp_bytes_curr_block_set(false),
758
- uncomp_bytes_inflight(0),
759
- blocks_inflight(0),
760
- curr_compression_ratio(0),
761
- estimated_file_size(0) {}
762
-
763
- // Estimate file size when a block is about to be emitted to
764
- // compression thread
765
- void EmitBlock(uint64_t uncomp_block_size, uint64_t curr_file_size) {
766
- uint64_t new_uncomp_bytes_inflight =
767
- uncomp_bytes_inflight.fetch_add(uncomp_block_size,
768
- std::memory_order_relaxed) +
769
- uncomp_block_size;
770
-
771
- uint64_t new_blocks_inflight =
772
- blocks_inflight.fetch_add(1, std::memory_order_relaxed) + 1;
773
-
774
- estimated_file_size.store(
775
- curr_file_size +
776
- static_cast<uint64_t>(
777
- static_cast<double>(new_uncomp_bytes_inflight) *
778
- curr_compression_ratio.load(std::memory_order_relaxed)) +
779
- new_blocks_inflight * kBlockTrailerSize,
780
- std::memory_order_relaxed);
781
- }
782
-
783
- // Estimate file size when a block is already reaped from
784
- // compression thread
785
- void ReapBlock(uint64_t compressed_block_size, uint64_t curr_file_size) {
786
- assert(uncomp_bytes_curr_block_set);
787
-
788
- uint64_t new_uncomp_bytes_compressed =
789
- uncomp_bytes_compressed + uncomp_bytes_curr_block;
790
- assert(new_uncomp_bytes_compressed > 0);
791
-
792
- curr_compression_ratio.store(
793
- (curr_compression_ratio.load(std::memory_order_relaxed) *
794
- uncomp_bytes_compressed +
795
- compressed_block_size) /
796
- static_cast<double>(new_uncomp_bytes_compressed),
797
- std::memory_order_relaxed);
798
- uncomp_bytes_compressed = new_uncomp_bytes_compressed;
799
-
800
- uint64_t new_uncomp_bytes_inflight =
801
- uncomp_bytes_inflight.fetch_sub(uncomp_bytes_curr_block,
802
- std::memory_order_relaxed) -
803
- uncomp_bytes_curr_block;
804
-
805
- uint64_t new_blocks_inflight =
806
- blocks_inflight.fetch_sub(1, std::memory_order_relaxed) - 1;
807
-
808
- estimated_file_size.store(
809
- curr_file_size +
810
- static_cast<uint64_t>(
811
- static_cast<double>(new_uncomp_bytes_inflight) *
812
- curr_compression_ratio.load(std::memory_order_relaxed)) +
813
- new_blocks_inflight * kBlockTrailerSize,
814
- std::memory_order_relaxed);
815
-
816
- uncomp_bytes_curr_block_set = false;
817
- }
818
-
819
- void SetEstimatedFileSize(uint64_t size) {
820
- estimated_file_size.store(size, std::memory_order_relaxed);
821
- }
822
-
823
- uint64_t GetEstimatedFileSize() {
824
- return estimated_file_size.load(std::memory_order_relaxed);
825
- }
826
-
827
- void SetCurrBlockUncompSize(uint64_t size) {
828
- uncomp_bytes_curr_block = size;
829
- uncomp_bytes_curr_block_set = true;
830
- }
831
-
832
- private:
833
- // Input bytes compressed so far.
834
- uint64_t uncomp_bytes_compressed;
835
- // Size of current block being appended.
836
- uint64_t uncomp_bytes_curr_block;
837
- // Whether uncomp_bytes_curr_block has been set for next
838
- // ReapBlock call.
839
- bool uncomp_bytes_curr_block_set;
840
- // Input bytes under compression and not appended yet.
841
- std::atomic<uint64_t> uncomp_bytes_inflight;
842
- // Number of blocks under compression and not appended yet.
843
- std::atomic<uint64_t> blocks_inflight;
844
- // Current compression ratio, maintained by BGWorkWriteMaybeCompressedBlock.
845
- std::atomic<double> curr_compression_ratio;
846
- // Estimated SST file size.
847
- std::atomic<uint64_t> estimated_file_size;
848
- };
849
- FileSizeEstimator file_size_estimator;
850
-
851
- // Facilities used for waiting first block completion. Need to Wait for
852
- // the completion of first block compression and flush to get a non-zero
853
- // compression ratio.
854
- std::atomic<bool> first_block_processed;
855
- std::condition_variable first_block_cond;
856
- std::mutex first_block_mutex;
857
-
858
- explicit ParallelCompressionRep(uint32_t parallel_threads)
859
- : curr_block_keys(new Keys()),
860
- block_rep_buf(parallel_threads),
861
- block_rep_pool(parallel_threads),
862
- compress_queue(parallel_threads),
863
- write_queue(parallel_threads),
864
- first_block_processed(false) {
865
- for (uint32_t i = 0; i < parallel_threads; i++) {
866
- block_rep_buf[i].contents = Slice();
867
- block_rep_buf[i].compressed_contents = Slice();
868
- block_rep_buf[i].data.reset(new std::string());
869
- block_rep_buf[i].compressed_data.reset(new std::string());
870
- block_rep_buf[i].compression_type = CompressionType();
871
- block_rep_buf[i].first_key_in_next_block.reset(new std::string());
872
- block_rep_buf[i].keys.reset(new Keys());
873
- block_rep_buf[i].slot.reset(new BlockRepSlot());
874
- block_rep_buf[i].status = Status::OK();
875
- block_rep_pool.push(&block_rep_buf[i]);
876
- }
877
- }
878
-
879
- ~ParallelCompressionRep() { block_rep_pool.finish(); }
880
-
881
- // Make a block prepared to be emitted to compression thread
882
- // Used in non-buffered mode
883
- BlockRep* PrepareBlock(CompressionType compression_type,
884
- const Slice* first_key_in_next_block,
885
- BlockBuilder* data_block) {
886
- BlockRep* block_rep =
887
- PrepareBlockInternal(compression_type, first_key_in_next_block);
888
- assert(block_rep != nullptr);
889
- data_block->SwapAndReset(*(block_rep->data));
890
- block_rep->contents = *(block_rep->data);
891
- std::swap(block_rep->keys, curr_block_keys);
892
- curr_block_keys->Clear();
893
- return block_rep;
894
- }
895
-
896
- // Used in EnterUnbuffered
897
- BlockRep* PrepareBlock(CompressionType compression_type,
898
- const Slice* first_key_in_next_block,
899
- std::string* data_block,
900
- std::vector<std::string>* keys) {
901
- BlockRep* block_rep =
902
- PrepareBlockInternal(compression_type, first_key_in_next_block);
903
- assert(block_rep != nullptr);
904
- std::swap(*(block_rep->data), *data_block);
905
- block_rep->contents = *(block_rep->data);
906
- block_rep->keys->SwapAssign(*keys);
907
- return block_rep;
908
- }
909
-
910
- // Emit a block to compression thread
911
- void EmitBlock(BlockRep* block_rep) {
912
- assert(block_rep != nullptr);
913
- assert(block_rep->status.ok());
914
- if (!write_queue.push(block_rep->slot.get())) {
915
- return;
916
- }
917
- if (!compress_queue.push(block_rep)) {
918
- return;
919
- }
920
-
921
- if (!first_block_processed.load(std::memory_order_relaxed)) {
922
- std::unique_lock<std::mutex> lock(first_block_mutex);
923
- first_block_cond.wait(lock, [this] {
924
- return first_block_processed.load(std::memory_order_relaxed);
925
- });
926
- }
927
- }
928
-
929
- // Reap a block from compression thread
930
- void ReapBlock(BlockRep* block_rep) {
931
- assert(block_rep != nullptr);
932
- block_rep->compressed_data->clear();
933
- block_rep_pool.push(block_rep);
934
-
935
- if (!first_block_processed.load(std::memory_order_relaxed)) {
936
- std::lock_guard<std::mutex> lock(first_block_mutex);
937
- first_block_processed.store(true, std::memory_order_relaxed);
938
- first_block_cond.notify_one();
939
- }
940
- }
941
-
942
- private:
943
- BlockRep* PrepareBlockInternal(CompressionType compression_type,
944
- const Slice* first_key_in_next_block) {
945
- BlockRep* block_rep = nullptr;
946
- block_rep_pool.pop(block_rep);
947
- assert(block_rep != nullptr);
948
-
949
- assert(block_rep->data);
950
-
951
- block_rep->compression_type = compression_type;
952
-
953
- if (first_key_in_next_block == nullptr) {
954
- block_rep->first_key_in_next_block.reset(nullptr);
955
- } else {
956
- block_rep->first_key_in_next_block->assign(
957
- first_key_in_next_block->data(), first_key_in_next_block->size());
958
- }
959
-
960
- return block_rep;
961
- }
962
- };
963
-
964
- BlockBasedTableBuilder::BlockBasedTableBuilder(
965
- const BlockBasedTableOptions& table_options, const TableBuilderOptions& tbo,
966
- WritableFileWriter* file) {
967
- BlockBasedTableOptions sanitized_table_options(table_options);
968
- if (sanitized_table_options.format_version == 0 &&
969
- sanitized_table_options.checksum != kCRC32c) {
970
- ROCKS_LOG_WARN(
971
- tbo.ioptions.logger,
972
- "Silently converting format_version to 1 because checksum is "
973
- "non-default");
974
- // silently convert format_version to 1 to keep consistent with current
975
- // behavior
976
- sanitized_table_options.format_version = 1;
977
- }
978
- auto ucmp = tbo.internal_comparator.user_comparator();
979
- assert(ucmp);
980
- (void)ucmp; // avoids unused variable error.
981
- rep_ = new Rep(sanitized_table_options, tbo, file);
982
-
983
- TEST_SYNC_POINT_CALLBACK(
984
- "BlockBasedTableBuilder::BlockBasedTableBuilder:PreSetupBaseCacheKey",
985
- const_cast<TableProperties*>(&rep_->props));
986
-
987
- BlockBasedTable::SetupBaseCacheKey(&rep_->props, tbo.db_session_id,
988
- tbo.cur_file_num, &rep_->base_cache_key);
989
-
990
- if (rep_->IsParallelCompressionEnabled()) {
991
- StartParallelCompression();
992
- }
993
- }
994
-
995
- BlockBasedTableBuilder::~BlockBasedTableBuilder() {
996
- // Catch errors where caller forgot to call Finish()
997
- assert(rep_->state == Rep::State::kClosed);
998
- delete rep_;
999
- }
1000
-
1001
- void BlockBasedTableBuilder::Add(const Slice& ikey, const Slice& value) {
1002
- Rep* r = rep_;
1003
- assert(rep_->state != Rep::State::kClosed);
1004
- if (!ok()) {
1005
- return;
1006
- }
1007
- ValueType value_type = ExtractValueType(ikey);
1008
- if (IsValueType(value_type)) {
1009
- #ifndef NDEBUG
1010
- if (r->props.num_entries > r->props.num_range_deletions) {
1011
- assert(r->internal_comparator.Compare(ikey, Slice(r->last_ikey)) > 0);
1012
- }
1013
- #endif // !NDEBUG
1014
-
1015
- auto should_flush = r->flush_block_policy->Update(ikey, value);
1016
- if (should_flush) {
1017
- assert(!r->data_block.empty());
1018
- r->first_key_in_next_block = &ikey;
1019
- Flush();
1020
- if (r->state == Rep::State::kBuffered) {
1021
- bool exceeds_buffer_limit =
1022
- (r->buffer_limit != 0 && r->data_begin_offset > r->buffer_limit);
1023
- bool exceeds_global_block_cache_limit = false;
1024
-
1025
- // Increase cache charging for the last buffered data block
1026
- // only if the block is not going to be unbuffered immediately
1027
- // and there exists a cache reservation manager
1028
- if (!exceeds_buffer_limit &&
1029
- r->compression_dict_buffer_cache_res_mgr != nullptr) {
1030
- Status s =
1031
- r->compression_dict_buffer_cache_res_mgr->UpdateCacheReservation(
1032
- r->data_begin_offset);
1033
- exceeds_global_block_cache_limit = s.IsMemoryLimit();
1034
- }
1035
-
1036
- if (exceeds_buffer_limit || exceeds_global_block_cache_limit) {
1037
- EnterUnbuffered();
1038
- }
1039
- }
1040
-
1041
- // Add item to index block.
1042
- // We do not emit the index entry for a block until we have seen the
1043
- // first key for the next data block. This allows us to use shorter
1044
- // keys in the index block. For example, consider a block boundary
1045
- // between the keys "the quick brown fox" and "the who". We can use
1046
- // "the r" as the key for the index block entry since it is >= all
1047
- // entries in the first block and < all entries in subsequent
1048
- // blocks.
1049
- if (ok() && r->state == Rep::State::kUnbuffered) {
1050
- if (r->IsParallelCompressionEnabled()) {
1051
- r->pc_rep->curr_block_keys->Clear();
1052
- } else {
1053
- r->index_builder->AddIndexEntry(r->last_ikey, &ikey,
1054
- r->pending_handle,
1055
- &r->index_separator_scratch);
1056
- }
1057
- }
1058
- }
1059
-
1060
- // Note: PartitionedFilterBlockBuilder requires key being added to filter
1061
- // builder after being added to index builder.
1062
- if (r->state == Rep::State::kUnbuffered) {
1063
- if (r->IsParallelCompressionEnabled()) {
1064
- r->pc_rep->curr_block_keys->PushBack(ikey);
1065
- } else {
1066
- if (r->filter_builder != nullptr) {
1067
- r->filter_builder->Add(
1068
- ExtractUserKeyAndStripTimestamp(ikey, r->ts_sz));
1069
- }
1070
- }
1071
- }
1072
-
1073
- r->data_block.AddWithLastKey(ikey, value, r->last_ikey);
1074
- r->last_ikey.assign(ikey.data(), ikey.size());
1075
- assert(!r->last_ikey.empty());
1076
- if (r->state == Rep::State::kBuffered) {
1077
- // Buffered keys will be replayed from data_block_buffers during
1078
- // `Finish()` once compression dictionary has been finalized.
1079
- } else {
1080
- if (!r->IsParallelCompressionEnabled()) {
1081
- r->index_builder->OnKeyAdded(ikey);
1082
- }
1083
- }
1084
- // TODO offset passed in is not accurate for parallel compression case
1085
- NotifyCollectTableCollectorsOnAdd(ikey, value, r->get_offset(),
1086
- r->table_properties_collectors,
1087
- r->ioptions.logger);
1088
-
1089
- } else if (value_type == kTypeRangeDeletion) {
1090
- Slice persisted_end = value;
1091
- // When timestamps should not be persisted, we physically strip away range
1092
- // tombstone end key's user timestamp before passing it along to block
1093
- // builder. Physically stripping away start key's user timestamp is
1094
- // handled at the block builder level in the same way as the other data
1095
- // blocks.
1096
- if (r->ts_sz > 0 && !r->persist_user_defined_timestamps) {
1097
- persisted_end = StripTimestampFromUserKey(value, r->ts_sz);
1098
- }
1099
- r->range_del_block.Add(ikey, persisted_end);
1100
- // TODO offset passed in is not accurate for parallel compression case
1101
- NotifyCollectTableCollectorsOnAdd(ikey, value, r->get_offset(),
1102
- r->table_properties_collectors,
1103
- r->ioptions.logger);
1104
- } else {
1105
- assert(false);
1106
- r->SetStatus(Status::InvalidArgument(
1107
- "BlockBasedBuilder::Add() received a key with invalid value type " +
1108
- std::to_string(static_cast<unsigned int>(value_type))));
1109
- return;
1110
- }
1111
-
1112
- r->props.num_entries++;
1113
- r->props.raw_key_size += ikey.size();
1114
- if (!r->persist_user_defined_timestamps) {
1115
- r->props.raw_key_size -= r->ts_sz;
1116
- }
1117
- r->props.raw_value_size += value.size();
1118
- if (value_type == kTypeDeletion || value_type == kTypeSingleDeletion ||
1119
- value_type == kTypeDeletionWithTimestamp) {
1120
- r->props.num_deletions++;
1121
- } else if (value_type == kTypeRangeDeletion) {
1122
- r->props.num_deletions++;
1123
- r->props.num_range_deletions++;
1124
- } else if (value_type == kTypeMerge) {
1125
- r->props.num_merge_operands++;
1126
- }
1127
- }
1128
-
1129
- void BlockBasedTableBuilder::Flush() {
1130
- Rep* r = rep_;
1131
- assert(rep_->state != Rep::State::kClosed);
1132
- if (!ok()) {
1133
- return;
1134
- }
1135
- if (r->data_block.empty()) {
1136
- return;
1137
- }
1138
- if (r->IsParallelCompressionEnabled() &&
1139
- r->state == Rep::State::kUnbuffered) {
1140
- r->data_block.Finish();
1141
- ParallelCompressionRep::BlockRep* block_rep = r->pc_rep->PrepareBlock(
1142
- r->compression_type, r->first_key_in_next_block, &(r->data_block));
1143
- assert(block_rep != nullptr);
1144
- r->pc_rep->file_size_estimator.EmitBlock(block_rep->data->size(),
1145
- r->get_offset());
1146
- r->pc_rep->EmitBlock(block_rep);
1147
- } else {
1148
- WriteBlock(&r->data_block, &r->pending_handle, BlockType::kData);
1149
- }
1150
- }
1151
-
1152
- void BlockBasedTableBuilder::WriteBlock(BlockBuilder* block,
1153
- BlockHandle* handle,
1154
- BlockType block_type) {
1155
- block->Finish();
1156
- std::string uncompressed_block_data;
1157
- uncompressed_block_data.reserve(rep_->table_options.block_size);
1158
- block->SwapAndReset(uncompressed_block_data);
1159
- if (rep_->state == Rep::State::kBuffered) {
1160
- assert(block_type == BlockType::kData);
1161
- rep_->data_block_buffers.emplace_back(std::move(uncompressed_block_data));
1162
- rep_->data_begin_offset += rep_->data_block_buffers.back().size();
1163
- return;
1164
- }
1165
- WriteBlock(uncompressed_block_data, handle, block_type);
1166
- }
1167
-
1168
- void BlockBasedTableBuilder::WriteBlock(const Slice& uncompressed_block_data,
1169
- BlockHandle* handle,
1170
- BlockType block_type) {
1171
- Rep* r = rep_;
1172
- assert(r->state == Rep::State::kUnbuffered);
1173
- Slice block_contents;
1174
- CompressionType type;
1175
- Status compress_status;
1176
- bool is_data_block = block_type == BlockType::kData;
1177
- CompressAndVerifyBlock(uncompressed_block_data, is_data_block,
1178
- *(r->compression_ctxs[0]), r->verify_ctxs[0].get(),
1179
- &(r->compressed_output), &(block_contents), &type,
1180
- &compress_status);
1181
- r->SetStatus(compress_status);
1182
- if (!ok()) {
1183
- return;
1184
- }
1185
-
1186
- TEST_SYNC_POINT_CALLBACK(
1187
- "BlockBasedTableBuilder::WriteBlock:TamperWithCompressedData",
1188
- &r->compressed_output);
1189
- WriteMaybeCompressedBlock(block_contents, type, handle, block_type,
1190
- &uncompressed_block_data);
1191
- r->compressed_output.clear();
1192
- if (is_data_block) {
1193
- r->props.data_size = r->get_offset();
1194
- ++r->props.num_data_blocks;
1195
- }
1196
- }
1197
-
1198
- void BlockBasedTableBuilder::BGWorkCompression(
1199
- const CompressionContext& compression_ctx,
1200
- UncompressionContext* verify_ctx) {
1201
- ParallelCompressionRep::BlockRep* block_rep = nullptr;
1202
- while (rep_->pc_rep->compress_queue.pop(block_rep)) {
1203
- assert(block_rep != nullptr);
1204
- CompressAndVerifyBlock(block_rep->contents, true, /* is_data_block*/
1205
- compression_ctx, verify_ctx,
1206
- block_rep->compressed_data.get(),
1207
- &block_rep->compressed_contents,
1208
- &(block_rep->compression_type), &block_rep->status);
1209
- block_rep->slot->Fill(block_rep);
1210
- }
1211
- }
1212
-
1213
- void BlockBasedTableBuilder::CompressAndVerifyBlock(
1214
- const Slice& uncompressed_block_data, bool is_data_block,
1215
- const CompressionContext& compression_ctx, UncompressionContext* verify_ctx,
1216
- std::string* compressed_output, Slice* block_contents,
1217
- CompressionType* type, Status* out_status) {
1218
- Rep* r = rep_;
1219
- bool is_status_ok = ok();
1220
- if (!r->IsParallelCompressionEnabled()) {
1221
- assert(is_status_ok);
1222
- }
1223
-
1224
- if (is_status_ok && uncompressed_block_data.size() < kCompressionSizeLimit) {
1225
- StopWatchNano timer(
1226
- r->ioptions.clock,
1227
- ShouldReportDetailedTime(r->ioptions.env, r->ioptions.stats));
1228
-
1229
- if (is_data_block) {
1230
- r->compressible_input_data_bytes.fetch_add(uncompressed_block_data.size(),
1231
- std::memory_order_relaxed);
1232
- }
1233
- const CompressionDict* compression_dict;
1234
- if (!is_data_block || r->compression_dict == nullptr) {
1235
- compression_dict = &CompressionDict::GetEmptyDict();
1236
- } else {
1237
- compression_dict = r->compression_dict.get();
1238
- }
1239
- assert(compression_dict != nullptr);
1240
- CompressionInfo compression_info(r->compression_opts, compression_ctx,
1241
- *compression_dict, r->compression_type,
1242
- r->sample_for_compression);
1243
-
1244
- std::string sampled_output_fast;
1245
- std::string sampled_output_slow;
1246
- *block_contents = CompressBlock(
1247
- uncompressed_block_data, compression_info, type,
1248
- r->table_options.format_version, is_data_block /* allow_sample */,
1249
- compressed_output, &sampled_output_fast, &sampled_output_slow);
1250
-
1251
- if (sampled_output_slow.size() > 0 || sampled_output_fast.size() > 0) {
1252
- // Currently compression sampling is only enabled for data block.
1253
- assert(is_data_block);
1254
- r->sampled_input_data_bytes.fetch_add(uncompressed_block_data.size(),
1255
- std::memory_order_relaxed);
1256
- r->sampled_output_slow_data_bytes.fetch_add(sampled_output_slow.size(),
1257
- std::memory_order_relaxed);
1258
- r->sampled_output_fast_data_bytes.fetch_add(sampled_output_fast.size(),
1259
- std::memory_order_relaxed);
1260
- }
1261
- // notify collectors on block add
1262
- NotifyCollectTableCollectorsOnBlockAdd(
1263
- r->table_properties_collectors, uncompressed_block_data.size(),
1264
- sampled_output_fast.size(), sampled_output_slow.size());
1265
-
1266
- // Some of the compression algorithms are known to be unreliable. If
1267
- // the verify_compression flag is set then try to de-compress the
1268
- // compressed data and compare to the input.
1269
- if (*type != kNoCompression && r->table_options.verify_compression) {
1270
- // Retrieve the uncompressed contents into a new buffer
1271
- const UncompressionDict* verify_dict;
1272
- if (!is_data_block || r->verify_dict == nullptr) {
1273
- verify_dict = &UncompressionDict::GetEmptyDict();
1274
- } else {
1275
- verify_dict = r->verify_dict.get();
1276
- }
1277
- assert(verify_dict != nullptr);
1278
- BlockContents contents;
1279
- UncompressionInfo uncompression_info(*verify_ctx, *verify_dict,
1280
- r->compression_type);
1281
- Status uncompress_status = UncompressBlockData(
1282
- uncompression_info, block_contents->data(), block_contents->size(),
1283
- &contents, r->table_options.format_version, r->ioptions);
1284
-
1285
- if (uncompress_status.ok()) {
1286
- bool data_match = contents.data.compare(uncompressed_block_data) == 0;
1287
- if (!data_match) {
1288
- // The result of the compression was invalid. abort.
1289
- const char* const msg =
1290
- "Decompressed block did not match pre-compression block";
1291
- ROCKS_LOG_ERROR(r->ioptions.logger, "%s", msg);
1292
- *out_status = Status::Corruption(msg);
1293
- *type = kNoCompression;
1294
- }
1295
- } else {
1296
- // Decompression reported an error. abort.
1297
- *out_status = Status::Corruption(std::string("Could not decompress: ") +
1298
- uncompress_status.getState());
1299
- *type = kNoCompression;
1300
- }
1301
- }
1302
- if (timer.IsStarted()) {
1303
- RecordTimeToHistogram(r->ioptions.stats, COMPRESSION_TIMES_NANOS,
1304
- timer.ElapsedNanos());
1305
- }
1306
- } else {
1307
- // Status is not OK, or block is too big to be compressed.
1308
- if (is_data_block) {
1309
- r->uncompressible_input_data_bytes.fetch_add(
1310
- uncompressed_block_data.size(), std::memory_order_relaxed);
1311
- }
1312
- *type = kNoCompression;
1313
- }
1314
- if (is_data_block) {
1315
- r->uncompressible_input_data_bytes.fetch_add(kBlockTrailerSize,
1316
- std::memory_order_relaxed);
1317
- }
1318
-
1319
- // Abort compression if the block is too big, or did not pass
1320
- // verification.
1321
- if (*type == kNoCompression) {
1322
- *block_contents = uncompressed_block_data;
1323
- bool compression_attempted = !compressed_output->empty();
1324
- RecordTick(r->ioptions.stats, compression_attempted
1325
- ? NUMBER_BLOCK_COMPRESSION_REJECTED
1326
- : NUMBER_BLOCK_COMPRESSION_BYPASSED);
1327
- RecordTick(r->ioptions.stats,
1328
- compression_attempted ? BYTES_COMPRESSION_REJECTED
1329
- : BYTES_COMPRESSION_BYPASSED,
1330
- uncompressed_block_data.size());
1331
- } else {
1332
- RecordTick(r->ioptions.stats, NUMBER_BLOCK_COMPRESSED);
1333
- RecordTick(r->ioptions.stats, BYTES_COMPRESSED_FROM,
1334
- uncompressed_block_data.size());
1335
- RecordTick(r->ioptions.stats, BYTES_COMPRESSED_TO,
1336
- compressed_output->size());
1337
- }
1338
- }
1339
-
1340
- void BlockBasedTableBuilder::WriteMaybeCompressedBlock(
1341
- const Slice& block_contents, CompressionType comp_type, BlockHandle* handle,
1342
- BlockType block_type, const Slice* uncompressed_block_data) {
1343
- // File format contains a sequence of blocks where each block has:
1344
- // block_data: uint8[n]
1345
- // compression_type: uint8
1346
- // checksum: uint32
1347
- Rep* r = rep_;
1348
- bool is_data_block = block_type == BlockType::kData;
1349
- IOOptions io_options;
1350
- IOStatus io_s =
1351
- WritableFileWriter::PrepareIOOptions(r->write_options, io_options);
1352
- if (!io_s.ok()) {
1353
- r->SetIOStatus(io_s);
1354
- return;
1355
- }
1356
- // Old, misleading name of this function: WriteRawBlock
1357
- StopWatch sw(r->ioptions.clock, r->ioptions.stats, WRITE_RAW_BLOCK_MICROS);
1358
- const uint64_t offset = r->get_offset();
1359
- handle->set_offset(offset);
1360
- handle->set_size(block_contents.size());
1361
- assert(status().ok());
1362
- assert(io_status().ok());
1363
- if (uncompressed_block_data == nullptr) {
1364
- uncompressed_block_data = &block_contents;
1365
- assert(comp_type == kNoCompression);
1366
- }
1367
-
1368
- {
1369
- io_s = r->file->Append(io_options, block_contents);
1370
- if (!io_s.ok()) {
1371
- r->SetIOStatus(io_s);
1372
- return;
1373
- }
1374
- }
1375
-
1376
- std::array<char, kBlockTrailerSize> trailer;
1377
- trailer[0] = comp_type;
1378
- uint32_t checksum = ComputeBuiltinChecksumWithLastByte(
1379
- r->table_options.checksum, block_contents.data(), block_contents.size(),
1380
- /*last_byte*/ comp_type);
1381
- checksum += ChecksumModifierForContext(r->base_context_checksum, offset);
1382
-
1383
- if (block_type == BlockType::kFilter) {
1384
- Status s = r->filter_builder->MaybePostVerifyFilter(block_contents);
1385
- if (!s.ok()) {
1386
- r->SetStatus(s);
1387
- return;
1388
- }
1389
- }
1390
-
1391
- EncodeFixed32(trailer.data() + 1, checksum);
1392
- TEST_SYNC_POINT_CALLBACK(
1393
- "BlockBasedTableBuilder::WriteMaybeCompressedBlock:TamperWithChecksum",
1394
- trailer.data());
1395
- {
1396
- io_s = r->file->Append(io_options, Slice(trailer.data(), trailer.size()));
1397
- if (!io_s.ok()) {
1398
- r->SetIOStatus(io_s);
1399
- return;
1400
- }
1401
- }
1402
-
1403
- {
1404
- bool warm_cache;
1405
- switch (r->table_options.prepopulate_block_cache) {
1406
- case BlockBasedTableOptions::PrepopulateBlockCache::kFlushOnly:
1407
- warm_cache = (r->reason == TableFileCreationReason::kFlush);
1408
- break;
1409
- case BlockBasedTableOptions::PrepopulateBlockCache::kDisable:
1410
- warm_cache = false;
1411
- break;
1412
- default:
1413
- // missing case
1414
- assert(false);
1415
- warm_cache = false;
1416
- }
1417
- if (warm_cache) {
1418
- Status s = InsertBlockInCacheHelper(*uncompressed_block_data, handle,
1419
- block_type);
1420
- if (!s.ok()) {
1421
- r->SetStatus(s);
1422
- return;
1423
- }
1424
- }
1425
- }
1426
-
1427
- r->set_offset(r->get_offset() + block_contents.size() + kBlockTrailerSize);
1428
- if (r->table_options.block_align && is_data_block) {
1429
- size_t pad_bytes =
1430
- (r->alignment -
1431
- ((block_contents.size() + kBlockTrailerSize) & (r->alignment - 1))) &
1432
- (r->alignment - 1);
1433
-
1434
- io_s = r->file->Pad(io_options, pad_bytes);
1435
- if (io_s.ok()) {
1436
- r->set_offset(r->get_offset() + pad_bytes);
1437
- } else {
1438
- r->SetIOStatus(io_s);
1439
- return;
1440
- }
1441
- }
1442
-
1443
- if (r->IsParallelCompressionEnabled()) {
1444
- if (is_data_block) {
1445
- r->pc_rep->file_size_estimator.ReapBlock(block_contents.size(),
1446
- r->get_offset());
1447
- } else {
1448
- r->pc_rep->file_size_estimator.SetEstimatedFileSize(r->get_offset());
1449
- }
1450
- }
1451
- }
1452
-
1453
- void BlockBasedTableBuilder::BGWorkWriteMaybeCompressedBlock() {
1454
- Rep* r = rep_;
1455
- ParallelCompressionRep::BlockRepSlot* slot = nullptr;
1456
- ParallelCompressionRep::BlockRep* block_rep = nullptr;
1457
- while (r->pc_rep->write_queue.pop(slot)) {
1458
- assert(slot != nullptr);
1459
- slot->Take(block_rep);
1460
- assert(block_rep != nullptr);
1461
- if (!block_rep->status.ok()) {
1462
- r->SetStatus(block_rep->status);
1463
- // Reap block so that blocked Flush() can finish
1464
- // if there is one, and Flush() will notice !ok() next time.
1465
- block_rep->status = Status::OK();
1466
- r->pc_rep->ReapBlock(block_rep);
1467
- continue;
1468
- }
1469
-
1470
- for (size_t i = 0; i < block_rep->keys->Size(); i++) {
1471
- auto& key = (*block_rep->keys)[i];
1472
- if (r->filter_builder != nullptr) {
1473
- r->filter_builder->Add(ExtractUserKeyAndStripTimestamp(key, r->ts_sz));
1474
- }
1475
- r->index_builder->OnKeyAdded(key);
1476
- }
1477
-
1478
- r->pc_rep->file_size_estimator.SetCurrBlockUncompSize(
1479
- block_rep->data->size());
1480
- WriteMaybeCompressedBlock(block_rep->compressed_contents,
1481
- block_rep->compression_type, &r->pending_handle,
1482
- BlockType::kData, &block_rep->contents);
1483
- if (!ok()) {
1484
- break;
1485
- }
1486
-
1487
- r->props.data_size = r->get_offset();
1488
- ++r->props.num_data_blocks;
1489
-
1490
- if (block_rep->first_key_in_next_block == nullptr) {
1491
- r->index_builder->AddIndexEntry(block_rep->keys->Back(), nullptr,
1492
- r->pending_handle,
1493
- &r->index_separator_scratch);
1494
- } else {
1495
- Slice first_key_in_next_block =
1496
- Slice(*block_rep->first_key_in_next_block);
1497
- r->index_builder->AddIndexEntry(
1498
- block_rep->keys->Back(), &first_key_in_next_block, r->pending_handle,
1499
- &r->index_separator_scratch);
1500
- }
1501
-
1502
- r->pc_rep->ReapBlock(block_rep);
1503
- }
1504
- }
1505
-
1506
- void BlockBasedTableBuilder::StartParallelCompression() {
1507
- rep_->pc_rep.reset(
1508
- new ParallelCompressionRep(rep_->compression_opts.parallel_threads));
1509
- rep_->pc_rep->compress_thread_pool.reserve(
1510
- rep_->compression_opts.parallel_threads);
1511
- for (uint32_t i = 0; i < rep_->compression_opts.parallel_threads; i++) {
1512
- rep_->pc_rep->compress_thread_pool.emplace_back([this, i] {
1513
- BGWorkCompression(*(rep_->compression_ctxs[i]),
1514
- rep_->verify_ctxs[i].get());
1515
- });
1516
- }
1517
- rep_->pc_rep->write_thread.reset(
1518
- new port::Thread([this] { BGWorkWriteMaybeCompressedBlock(); }));
1519
- }
1520
-
1521
- void BlockBasedTableBuilder::StopParallelCompression() {
1522
- rep_->pc_rep->compress_queue.finish();
1523
- for (auto& thread : rep_->pc_rep->compress_thread_pool) {
1524
- thread.join();
1525
- }
1526
- rep_->pc_rep->write_queue.finish();
1527
- rep_->pc_rep->write_thread->join();
1528
- }
1529
-
1530
- Status BlockBasedTableBuilder::status() const { return rep_->GetStatus(); }
1531
-
1532
- IOStatus BlockBasedTableBuilder::io_status() const {
1533
- return rep_->GetIOStatus();
1534
- }
1535
-
1536
- Status BlockBasedTableBuilder::InsertBlockInCacheHelper(
1537
- const Slice& block_contents, const BlockHandle* handle,
1538
- BlockType block_type) {
1539
-
1540
- Cache* block_cache = rep_->table_options.block_cache.get();
1541
- Status s;
1542
- auto helper =
1543
- GetCacheItemHelper(block_type, rep_->ioptions.lowest_used_cache_tier);
1544
- if (block_cache && helper && helper->create_cb) {
1545
- CacheKey key = BlockBasedTable::GetCacheKey(rep_->base_cache_key, *handle);
1546
- size_t charge;
1547
- s = WarmInCache(block_cache, key.AsSlice(), block_contents,
1548
- &rep_->create_context, helper, Cache::Priority::LOW,
1549
- &charge);
1550
-
1551
- if (s.ok()) {
1552
- BlockBasedTable::UpdateCacheInsertionMetrics(
1553
- block_type, nullptr /*get_context*/, charge, s.IsOkOverwritten(),
1554
- rep_->ioptions.stats);
1555
- } else {
1556
- RecordTick(rep_->ioptions.stats, BLOCK_CACHE_ADD_FAILURES);
1557
- }
1558
- }
1559
- return s;
1560
- }
1561
-
1562
- void BlockBasedTableBuilder::WriteFilterBlock(
1563
- MetaIndexBuilder* meta_index_builder) {
1564
- if (rep_->filter_builder == nullptr || rep_->filter_builder->IsEmpty()) {
1565
- // No filter block needed
1566
- return;
1567
- }
1568
- BlockHandle filter_block_handle;
1569
- bool is_partitioned_filter = rep_->table_options.partition_filters;
1570
- if (ok()) {
1571
- rep_->props.num_filter_entries +=
1572
- rep_->filter_builder->EstimateEntriesAdded();
1573
- Status s = Status::Incomplete();
1574
- while (ok() && s.IsIncomplete()) {
1575
- // filter_data is used to store the transferred filter data payload from
1576
- // FilterBlockBuilder and deallocate the payload by going out of scope.
1577
- // Otherwise, the payload will unnecessarily remain until
1578
- // BlockBasedTableBuilder is deallocated.
1579
- //
1580
- // See FilterBlockBuilder::Finish() for more on the difference in
1581
- // transferred filter data payload among different FilterBlockBuilder
1582
- // subtypes.
1583
- std::unique_ptr<const char[]> filter_owner;
1584
- Slice filter_content;
1585
- s = rep_->filter_builder->Finish(filter_block_handle, &filter_content,
1586
- &filter_owner);
1587
-
1588
- assert(s.ok() || s.IsIncomplete() || s.IsCorruption());
1589
- if (s.IsCorruption()) {
1590
- rep_->SetStatus(s);
1591
- break;
1592
- }
1593
-
1594
- rep_->props.filter_size += filter_content.size();
1595
-
1596
- BlockType btype = is_partitioned_filter && /* last */ s.ok()
1597
- ? BlockType::kFilterPartitionIndex
1598
- : BlockType::kFilter;
1599
- WriteMaybeCompressedBlock(filter_content, kNoCompression,
1600
- &filter_block_handle, btype);
1601
- }
1602
- rep_->filter_builder->ResetFilterBitsBuilder();
1603
- }
1604
- if (ok()) {
1605
- // Add mapping from "<filter_block_prefix>.Name" to location
1606
- // of filter data.
1607
- std::string key;
1608
- key = is_partitioned_filter ? BlockBasedTable::kPartitionedFilterBlockPrefix
1609
- : BlockBasedTable::kFullFilterBlockPrefix;
1610
- key.append(rep_->table_options.filter_policy->CompatibilityName());
1611
- meta_index_builder->Add(key, filter_block_handle);
1612
- }
1613
- }
1614
-
1615
- void BlockBasedTableBuilder::WriteIndexBlock(
1616
- MetaIndexBuilder* meta_index_builder, BlockHandle* index_block_handle) {
1617
- if (!ok()) {
1618
- return;
1619
- }
1620
- IndexBuilder::IndexBlocks index_blocks;
1621
- auto index_builder_status = rep_->index_builder->Finish(&index_blocks);
1622
- if (index_builder_status.IsIncomplete()) {
1623
- // We we have more than one index partition then meta_blocks are not
1624
- // supported for the index. Currently meta_blocks are used only by
1625
- // HashIndexBuilder which is not multi-partition.
1626
- assert(index_blocks.meta_blocks.empty());
1627
- } else if (ok() && !index_builder_status.ok()) {
1628
- rep_->SetStatus(index_builder_status);
1629
- }
1630
- if (ok()) {
1631
- for (const auto& item : index_blocks.meta_blocks) {
1632
- BlockHandle block_handle;
1633
- WriteBlock(item.second, &block_handle, BlockType::kIndex);
1634
- if (!ok()) {
1635
- break;
1636
- }
1637
- meta_index_builder->Add(item.first, block_handle);
1638
- }
1639
- }
1640
- if (ok()) {
1641
- if (rep_->table_options.enable_index_compression) {
1642
- WriteBlock(index_blocks.index_block_contents, index_block_handle,
1643
- BlockType::kIndex);
1644
- } else {
1645
- WriteMaybeCompressedBlock(index_blocks.index_block_contents,
1646
- kNoCompression, index_block_handle,
1647
- BlockType::kIndex);
1648
- }
1649
- }
1650
- // If there are more index partitions, finish them and write them out
1651
- if (index_builder_status.IsIncomplete()) {
1652
- bool index_building_finished = false;
1653
- while (ok() && !index_building_finished) {
1654
- Status s =
1655
- rep_->index_builder->Finish(&index_blocks, *index_block_handle);
1656
- if (s.ok()) {
1657
- index_building_finished = true;
1658
- } else if (s.IsIncomplete()) {
1659
- // More partitioned index after this one
1660
- assert(!index_building_finished);
1661
- } else {
1662
- // Error
1663
- rep_->SetStatus(s);
1664
- return;
1665
- }
1666
-
1667
- if (rep_->table_options.enable_index_compression) {
1668
- WriteBlock(index_blocks.index_block_contents, index_block_handle,
1669
- BlockType::kIndex);
1670
- } else {
1671
- WriteMaybeCompressedBlock(index_blocks.index_block_contents,
1672
- kNoCompression, index_block_handle,
1673
- BlockType::kIndex);
1674
- }
1675
- // The last index_block_handle will be for the partition index block
1676
- }
1677
- }
1678
- // If success and need to record in metaindex rather than footer...
1679
- if (!FormatVersionUsesIndexHandleInFooter(
1680
- rep_->table_options.format_version)) {
1681
- meta_index_builder->Add(kIndexBlockName, *index_block_handle);
1682
- }
1683
- }
1684
-
1685
- void BlockBasedTableBuilder::WritePropertiesBlock(
1686
- MetaIndexBuilder* meta_index_builder) {
1687
- BlockHandle properties_block_handle;
1688
- if (ok()) {
1689
- PropertyBlockBuilder property_block_builder;
1690
- rep_->props.filter_policy_name =
1691
- rep_->table_options.filter_policy != nullptr
1692
- ? rep_->table_options.filter_policy->Name()
1693
- : "";
1694
- rep_->props.index_size =
1695
- rep_->index_builder->IndexSize() + kBlockTrailerSize;
1696
- rep_->props.comparator_name = rep_->ioptions.user_comparator != nullptr
1697
- ? rep_->ioptions.user_comparator->Name()
1698
- : "nullptr";
1699
- rep_->props.merge_operator_name =
1700
- rep_->ioptions.merge_operator != nullptr
1701
- ? rep_->ioptions.merge_operator->Name()
1702
- : "nullptr";
1703
- rep_->props.compression_name =
1704
- CompressionTypeToString(rep_->compression_type);
1705
- rep_->props.compression_options =
1706
- CompressionOptionsToString(rep_->compression_opts);
1707
- rep_->props.prefix_extractor_name =
1708
- rep_->prefix_extractor ? rep_->prefix_extractor->AsString() : "nullptr";
1709
- std::string property_collectors_names = "[";
1710
- for (size_t i = 0;
1711
- i < rep_->ioptions.table_properties_collector_factories.size(); ++i) {
1712
- if (i != 0) {
1713
- property_collectors_names += ",";
1714
- }
1715
- property_collectors_names +=
1716
- rep_->ioptions.table_properties_collector_factories[i]->Name();
1717
- }
1718
- property_collectors_names += "]";
1719
- rep_->props.property_collectors_names = property_collectors_names;
1720
- if (rep_->table_options.index_type ==
1721
- BlockBasedTableOptions::kTwoLevelIndexSearch) {
1722
- assert(rep_->p_index_builder_ != nullptr);
1723
- rep_->props.index_partitions = rep_->p_index_builder_->NumPartitions();
1724
- rep_->props.top_level_index_size =
1725
- rep_->p_index_builder_->TopLevelIndexSize(rep_->offset);
1726
- }
1727
- rep_->props.index_key_is_user_key =
1728
- !rep_->index_builder->seperator_is_key_plus_seq();
1729
- rep_->props.index_value_is_delta_encoded =
1730
- rep_->use_delta_encoding_for_index_values;
1731
- if (rep_->sampled_input_data_bytes > 0) {
1732
- rep_->props.slow_compression_estimated_data_size = static_cast<uint64_t>(
1733
- static_cast<double>(rep_->sampled_output_slow_data_bytes) /
1734
- rep_->sampled_input_data_bytes *
1735
- rep_->compressible_input_data_bytes +
1736
- rep_->uncompressible_input_data_bytes + 0.5);
1737
- rep_->props.fast_compression_estimated_data_size = static_cast<uint64_t>(
1738
- static_cast<double>(rep_->sampled_output_fast_data_bytes) /
1739
- rep_->sampled_input_data_bytes *
1740
- rep_->compressible_input_data_bytes +
1741
- rep_->uncompressible_input_data_bytes + 0.5);
1742
- } else if (rep_->sample_for_compression > 0) {
1743
- // We tried to sample but none were found. Assume worst-case (compression
1744
- // ratio 1.0) so data is complete and aggregatable.
1745
- rep_->props.slow_compression_estimated_data_size =
1746
- rep_->compressible_input_data_bytes +
1747
- rep_->uncompressible_input_data_bytes;
1748
- rep_->props.fast_compression_estimated_data_size =
1749
- rep_->compressible_input_data_bytes +
1750
- rep_->uncompressible_input_data_bytes;
1751
- }
1752
- rep_->props.user_defined_timestamps_persisted =
1753
- rep_->persist_user_defined_timestamps;
1754
-
1755
- // Add basic properties
1756
- property_block_builder.AddTableProperty(rep_->props);
1757
-
1758
- // Add use collected properties
1759
- NotifyCollectTableCollectorsOnFinish(
1760
- rep_->table_properties_collectors, rep_->ioptions.logger,
1761
- &property_block_builder, rep_->props.user_collected_properties,
1762
- rep_->props.readable_properties);
1763
-
1764
- Slice block_data = property_block_builder.Finish();
1765
- TEST_SYNC_POINT_CALLBACK(
1766
- "BlockBasedTableBuilder::WritePropertiesBlock:BlockData", &block_data);
1767
- WriteMaybeCompressedBlock(block_data, kNoCompression,
1768
- &properties_block_handle, BlockType::kProperties);
1769
- }
1770
- if (ok()) {
1771
- #ifndef NDEBUG
1772
- {
1773
- uint64_t props_block_offset = properties_block_handle.offset();
1774
- uint64_t props_block_size = properties_block_handle.size();
1775
- TEST_SYNC_POINT_CALLBACK(
1776
- "BlockBasedTableBuilder::WritePropertiesBlock:GetPropsBlockOffset",
1777
- &props_block_offset);
1778
- TEST_SYNC_POINT_CALLBACK(
1779
- "BlockBasedTableBuilder::WritePropertiesBlock:GetPropsBlockSize",
1780
- &props_block_size);
1781
- }
1782
- #endif // !NDEBUG
1783
-
1784
- const std::string* properties_block_meta = &kPropertiesBlockName;
1785
- TEST_SYNC_POINT_CALLBACK(
1786
- "BlockBasedTableBuilder::WritePropertiesBlock:Meta",
1787
- &properties_block_meta);
1788
- meta_index_builder->Add(*properties_block_meta, properties_block_handle);
1789
- }
1790
- }
1791
-
1792
- void BlockBasedTableBuilder::WriteCompressionDictBlock(
1793
- MetaIndexBuilder* meta_index_builder) {
1794
- if (rep_->compression_dict != nullptr &&
1795
- rep_->compression_dict->GetRawDict().size()) {
1796
- BlockHandle compression_dict_block_handle;
1797
- if (ok()) {
1798
- WriteMaybeCompressedBlock(rep_->compression_dict->GetRawDict(),
1799
- kNoCompression, &compression_dict_block_handle,
1800
- BlockType::kCompressionDictionary);
1801
- #ifndef NDEBUG
1802
- Slice compression_dict = rep_->compression_dict->GetRawDict();
1803
- TEST_SYNC_POINT_CALLBACK(
1804
- "BlockBasedTableBuilder::WriteCompressionDictBlock:RawDict",
1805
- &compression_dict);
1806
- #endif // NDEBUG
1807
- }
1808
- if (ok()) {
1809
- meta_index_builder->Add(kCompressionDictBlockName,
1810
- compression_dict_block_handle);
1811
- }
1812
- }
1813
- }
1814
-
1815
- void BlockBasedTableBuilder::WriteRangeDelBlock(
1816
- MetaIndexBuilder* meta_index_builder) {
1817
- if (ok() && !rep_->range_del_block.empty()) {
1818
- BlockHandle range_del_block_handle;
1819
- WriteMaybeCompressedBlock(rep_->range_del_block.Finish(), kNoCompression,
1820
- &range_del_block_handle,
1821
- BlockType::kRangeDeletion);
1822
- meta_index_builder->Add(kRangeDelBlockName, range_del_block_handle);
1823
- }
1824
- }
1825
-
1826
- void BlockBasedTableBuilder::WriteFooter(BlockHandle& metaindex_block_handle,
1827
- BlockHandle& index_block_handle) {
1828
- assert(ok());
1829
- Rep* r = rep_;
1830
- // this is guaranteed by BlockBasedTableBuilder's constructor
1831
- assert(r->table_options.checksum == kCRC32c ||
1832
- r->table_options.format_version != 0);
1833
- FooterBuilder footer;
1834
- Status s = footer.Build(kBlockBasedTableMagicNumber,
1835
- r->table_options.format_version, r->get_offset(),
1836
- r->table_options.checksum, metaindex_block_handle,
1837
- index_block_handle, r->base_context_checksum);
1838
- if (!s.ok()) {
1839
- r->SetStatus(s);
1840
- return;
1841
- }
1842
- IOOptions io_options;
1843
- IOStatus ios =
1844
- WritableFileWriter::PrepareIOOptions(r->write_options, io_options);
1845
- if (!ios.ok()) {
1846
- r->SetIOStatus(ios);
1847
- return;
1848
- }
1849
- ios = r->file->Append(io_options, footer.GetSlice());
1850
- if (ios.ok()) {
1851
- r->set_offset(r->get_offset() + footer.GetSlice().size());
1852
- } else {
1853
- r->SetIOStatus(ios);
1854
- }
1855
- }
1856
-
1857
- void BlockBasedTableBuilder::EnterUnbuffered() {
1858
- Rep* r = rep_;
1859
- assert(r->state == Rep::State::kBuffered);
1860
- r->state = Rep::State::kUnbuffered;
1861
- const size_t kSampleBytes = r->compression_opts.zstd_max_train_bytes > 0
1862
- ? r->compression_opts.zstd_max_train_bytes
1863
- : r->compression_opts.max_dict_bytes;
1864
- const size_t kNumBlocksBuffered = r->data_block_buffers.size();
1865
- if (kNumBlocksBuffered == 0) {
1866
- // The below code is neither safe nor necessary for handling zero data
1867
- // blocks.
1868
- return;
1869
- }
1870
-
1871
- // Abstract algebra teaches us that a finite cyclic group (such as the
1872
- // additive group of integers modulo N) can be generated by a number that is
1873
- // coprime with N. Since N is variable (number of buffered data blocks), we
1874
- // must then pick a prime number in order to guarantee coprimeness with any N.
1875
- //
1876
- // One downside of this approach is the spread will be poor when
1877
- // `kPrimeGeneratorRemainder` is close to zero or close to
1878
- // `kNumBlocksBuffered`.
1879
- //
1880
- // Picked a random number between one and one trillion and then chose the
1881
- // next prime number greater than or equal to it.
1882
- const uint64_t kPrimeGenerator = 545055921143ull;
1883
- // Can avoid repeated division by just adding the remainder repeatedly.
1884
- const size_t kPrimeGeneratorRemainder = static_cast<size_t>(
1885
- kPrimeGenerator % static_cast<uint64_t>(kNumBlocksBuffered));
1886
- const size_t kInitSampleIdx = kNumBlocksBuffered / 2;
1887
-
1888
- std::string compression_dict_samples;
1889
- std::vector<size_t> compression_dict_sample_lens;
1890
- size_t buffer_idx = kInitSampleIdx;
1891
- for (size_t i = 0;
1892
- i < kNumBlocksBuffered && compression_dict_samples.size() < kSampleBytes;
1893
- ++i) {
1894
- size_t copy_len = std::min(kSampleBytes - compression_dict_samples.size(),
1895
- r->data_block_buffers[buffer_idx].size());
1896
- compression_dict_samples.append(r->data_block_buffers[buffer_idx], 0,
1897
- copy_len);
1898
- compression_dict_sample_lens.emplace_back(copy_len);
1899
-
1900
- buffer_idx += kPrimeGeneratorRemainder;
1901
- if (buffer_idx >= kNumBlocksBuffered) {
1902
- buffer_idx -= kNumBlocksBuffered;
1903
- }
1904
- }
1905
-
1906
- // final data block flushed, now we can generate dictionary from the samples.
1907
- // OK if compression_dict_samples is empty, we'll just get empty dictionary.
1908
- std::string dict;
1909
- if (r->compression_opts.zstd_max_train_bytes > 0) {
1910
- if (r->compression_opts.use_zstd_dict_trainer) {
1911
- dict = ZSTD_TrainDictionary(compression_dict_samples,
1912
- compression_dict_sample_lens,
1913
- r->compression_opts.max_dict_bytes);
1914
- } else {
1915
- dict = ZSTD_FinalizeDictionary(
1916
- compression_dict_samples, compression_dict_sample_lens,
1917
- r->compression_opts.max_dict_bytes, r->compression_opts.level);
1918
- }
1919
- } else {
1920
- dict = std::move(compression_dict_samples);
1921
- }
1922
- r->compression_dict.reset(new CompressionDict(dict, r->compression_type,
1923
- r->compression_opts.level));
1924
- r->verify_dict.reset(new UncompressionDict(
1925
- dict, r->compression_type == kZSTD ||
1926
- r->compression_type == kZSTDNotFinalCompression));
1927
-
1928
- auto get_iterator_for_block = [&r](size_t i) {
1929
- auto& data_block = r->data_block_buffers[i];
1930
- assert(!data_block.empty());
1931
-
1932
- Block reader{BlockContents{data_block}};
1933
- DataBlockIter* iter = reader.NewDataIterator(
1934
- r->internal_comparator.user_comparator(), kDisableGlobalSequenceNumber,
1935
- nullptr /* iter */, nullptr /* stats */,
1936
- false /* block_contents_pinned */, r->persist_user_defined_timestamps);
1937
-
1938
- iter->SeekToFirst();
1939
- assert(iter->Valid());
1940
- return std::unique_ptr<DataBlockIter>(iter);
1941
- };
1942
-
1943
- std::unique_ptr<DataBlockIter> iter = nullptr, next_block_iter = nullptr;
1944
-
1945
- for (size_t i = 0; ok() && i < r->data_block_buffers.size(); ++i) {
1946
- if (iter == nullptr) {
1947
- iter = get_iterator_for_block(i);
1948
- assert(iter != nullptr);
1949
- };
1950
-
1951
- if (i + 1 < r->data_block_buffers.size()) {
1952
- next_block_iter = get_iterator_for_block(i + 1);
1953
- }
1954
-
1955
- auto& data_block = r->data_block_buffers[i];
1956
- if (r->IsParallelCompressionEnabled()) {
1957
- Slice first_key_in_next_block;
1958
- const Slice* first_key_in_next_block_ptr = &first_key_in_next_block;
1959
- if (i + 1 < r->data_block_buffers.size()) {
1960
- assert(next_block_iter != nullptr);
1961
- first_key_in_next_block = next_block_iter->key();
1962
- } else {
1963
- first_key_in_next_block_ptr = r->first_key_in_next_block;
1964
- }
1965
-
1966
- std::vector<std::string> keys;
1967
- for (; iter->Valid(); iter->Next()) {
1968
- keys.emplace_back(iter->key().ToString());
1969
- }
1970
-
1971
- ParallelCompressionRep::BlockRep* block_rep = r->pc_rep->PrepareBlock(
1972
- r->compression_type, first_key_in_next_block_ptr, &data_block, &keys);
1973
-
1974
- assert(block_rep != nullptr);
1975
- r->pc_rep->file_size_estimator.EmitBlock(block_rep->data->size(),
1976
- r->get_offset());
1977
- r->pc_rep->EmitBlock(block_rep);
1978
- } else {
1979
- for (; iter->Valid(); iter->Next()) {
1980
- Slice key = iter->key();
1981
- if (r->filter_builder != nullptr) {
1982
- r->filter_builder->Add(
1983
- ExtractUserKeyAndStripTimestamp(key, r->ts_sz));
1984
- }
1985
- r->index_builder->OnKeyAdded(key);
1986
- }
1987
- WriteBlock(Slice(data_block), &r->pending_handle, BlockType::kData);
1988
- if (ok() && i + 1 < r->data_block_buffers.size()) {
1989
- assert(next_block_iter != nullptr);
1990
- Slice first_key_in_next_block = next_block_iter->key();
1991
-
1992
- Slice* first_key_in_next_block_ptr = &first_key_in_next_block;
1993
-
1994
- iter->SeekToLast();
1995
- r->index_builder->AddIndexEntry(
1996
- iter->key(), first_key_in_next_block_ptr, r->pending_handle,
1997
- &r->index_separator_scratch);
1998
- }
1999
- }
2000
- std::swap(iter, next_block_iter);
2001
- }
2002
- r->data_block_buffers.clear();
2003
- r->data_begin_offset = 0;
2004
- // Release all reserved cache for data block buffers
2005
- if (r->compression_dict_buffer_cache_res_mgr != nullptr) {
2006
- Status s = r->compression_dict_buffer_cache_res_mgr->UpdateCacheReservation(
2007
- r->data_begin_offset);
2008
- s.PermitUncheckedError();
2009
- }
2010
- }
2011
-
2012
- Status BlockBasedTableBuilder::Finish() {
2013
- Rep* r = rep_;
2014
- assert(r->state != Rep::State::kClosed);
2015
- bool empty_data_block = r->data_block.empty();
2016
- r->first_key_in_next_block = nullptr;
2017
- Flush();
2018
- if (r->state == Rep::State::kBuffered) {
2019
- EnterUnbuffered();
2020
- }
2021
- if (r->IsParallelCompressionEnabled()) {
2022
- StopParallelCompression();
2023
- #ifndef NDEBUG
2024
- for (const auto& br : r->pc_rep->block_rep_buf) {
2025
- assert(br.status.ok());
2026
- }
2027
- #endif // !NDEBUG
2028
- } else {
2029
- // To make sure properties block is able to keep the accurate size of index
2030
- // block, we will finish writing all index entries first.
2031
- if (ok() && !empty_data_block) {
2032
- r->index_builder->AddIndexEntry(
2033
- r->last_ikey, nullptr /* no next data block */, r->pending_handle,
2034
- &r->index_separator_scratch);
2035
- }
2036
- }
2037
-
2038
- r->props.tail_start_offset = r->offset;
2039
-
2040
- // Write meta blocks, metaindex block and footer in the following order.
2041
- // 1. [meta block: filter]
2042
- // 2. [meta block: index]
2043
- // 3. [meta block: compression dictionary]
2044
- // 4. [meta block: range deletion tombstone]
2045
- // 5. [meta block: properties]
2046
- // 6. [metaindex block]
2047
- // 7. Footer
2048
- BlockHandle metaindex_block_handle, index_block_handle;
2049
- MetaIndexBuilder meta_index_builder;
2050
- WriteFilterBlock(&meta_index_builder);
2051
- WriteIndexBlock(&meta_index_builder, &index_block_handle);
2052
- WriteCompressionDictBlock(&meta_index_builder);
2053
- WriteRangeDelBlock(&meta_index_builder);
2054
- WritePropertiesBlock(&meta_index_builder);
2055
- if (ok()) {
2056
- // flush the meta index block
2057
- WriteMaybeCompressedBlock(meta_index_builder.Finish(), kNoCompression,
2058
- &metaindex_block_handle, BlockType::kMetaIndex);
2059
- }
2060
- if (ok()) {
2061
- WriteFooter(metaindex_block_handle, index_block_handle);
2062
- }
2063
- r->state = Rep::State::kClosed;
2064
- r->tail_size = r->offset - r->props.tail_start_offset;
2065
-
2066
- Status ret_status = r->CopyStatus();
2067
- IOStatus ios = r->GetIOStatus();
2068
- if (!ios.ok() && ret_status.ok()) {
2069
- // Let io_status supersede ok status (otherwise status takes precedennce)
2070
- ret_status = ios;
2071
- }
2072
- return ret_status;
2073
- }
2074
-
2075
- void BlockBasedTableBuilder::Abandon() {
2076
- assert(rep_->state != Rep::State::kClosed);
2077
- if (rep_->IsParallelCompressionEnabled()) {
2078
- StopParallelCompression();
2079
- }
2080
- rep_->state = Rep::State::kClosed;
2081
- #ifdef ROCKSDB_ASSERT_STATUS_CHECKED // Avoid unnecessary lock acquisition
2082
- rep_->CopyStatus().PermitUncheckedError();
2083
- rep_->CopyIOStatus().PermitUncheckedError();
2084
- #endif // ROCKSDB_ASSERT_STATUS_CHECKED
2085
- }
2086
-
2087
- uint64_t BlockBasedTableBuilder::NumEntries() const {
2088
- return rep_->props.num_entries;
2089
- }
2090
-
2091
- bool BlockBasedTableBuilder::IsEmpty() const {
2092
- return rep_->props.num_entries == 0 && rep_->props.num_range_deletions == 0;
2093
- }
2094
-
2095
- uint64_t BlockBasedTableBuilder::FileSize() const { return rep_->offset; }
2096
-
2097
- uint64_t BlockBasedTableBuilder::EstimatedFileSize() const {
2098
- if (rep_->IsParallelCompressionEnabled()) {
2099
- // Use compression ratio so far and inflight uncompressed bytes to estimate
2100
- // final SST size.
2101
- return rep_->pc_rep->file_size_estimator.GetEstimatedFileSize();
2102
- } else {
2103
- return FileSize();
2104
- }
2105
- }
2106
-
2107
- uint64_t BlockBasedTableBuilder::GetTailSize() const { return rep_->tail_size; }
2108
-
2109
- bool BlockBasedTableBuilder::NeedCompact() const {
2110
- for (const auto& collector : rep_->table_properties_collectors) {
2111
- if (collector->NeedCompact()) {
2112
- return true;
2113
- }
2114
- }
2115
- return false;
2116
- }
2117
-
2118
- TableProperties BlockBasedTableBuilder::GetTableProperties() const {
2119
- return rep_->props;
2120
- }
2121
-
2122
- std::string BlockBasedTableBuilder::GetFileChecksum() const {
2123
- if (rep_->file != nullptr) {
2124
- return rep_->file->GetFileChecksum();
2125
- } else {
2126
- return kUnknownFileChecksum;
2127
- }
2128
- }
2129
-
2130
- const char* BlockBasedTableBuilder::GetFileChecksumFuncName() const {
2131
- if (rep_->file != nullptr) {
2132
- return rep_->file->GetFileChecksumFuncName();
2133
- } else {
2134
- return kUnknownFileChecksumFuncName;
2135
- }
2136
- }
2137
- void BlockBasedTableBuilder::SetSeqnoTimeTableProperties(
2138
- const SeqnoToTimeMapping& relevant_mapping, uint64_t oldest_ancestor_time) {
2139
- assert(rep_->props.seqno_to_time_mapping.empty());
2140
- relevant_mapping.EncodeTo(rep_->props.seqno_to_time_mapping);
2141
- rep_->props.creation_time = oldest_ancestor_time;
2142
- }
2143
-
2144
- const std::string BlockBasedTable::kObsoleteFilterBlockPrefix = "filter.";
2145
- const std::string BlockBasedTable::kFullFilterBlockPrefix = "fullfilter.";
2146
- const std::string BlockBasedTable::kPartitionedFilterBlockPrefix =
2147
- "partitionedfilter.";
2148
- } // namespace ROCKSDB_NAMESPACE