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,4052 +0,0 @@
1
- /* Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
- Use of this source code is governed by a BSD-style license that can be
3
- found in the LICENSE file. See the AUTHORS file for names of contributors. */
4
- // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
5
-
6
- #include "rocksdb/c.h"
7
-
8
- #include <assert.h>
9
- #include <stddef.h>
10
- #include <stdio.h>
11
- #include <stdlib.h>
12
- #include <string.h>
13
- #include <sys/types.h>
14
- #ifndef OS_WIN
15
- #include <unistd.h>
16
- #endif
17
- #include <inttypes.h>
18
-
19
- // Can not use port/port.h macros as this is a c file
20
- #ifdef OS_WIN
21
- #include <windows.h>
22
-
23
- // Ok for uniqueness
24
- int geteuid() {
25
- int result = 0;
26
-
27
- result = ((int)GetCurrentProcessId() << 16);
28
- result |= (int)GetCurrentThreadId();
29
-
30
- return result;
31
- }
32
-
33
- #endif
34
-
35
- const char* phase = "";
36
- static char dbname[200];
37
- static char sstfilename[200];
38
- static char dbbackupname[200];
39
- static char dbcheckpointname[200];
40
- static char dbpathname[200];
41
- static char secondary_path[200];
42
-
43
- static void StartPhase(const char* name) {
44
- fprintf(stderr, "=== Test %s\n", name);
45
- phase = name;
46
- }
47
- #ifdef _MSC_VER
48
- #pragma warning(push)
49
- #pragma warning(disable : 4996) // getenv security warning
50
- #endif
51
- static const char* GetTempDir(void) {
52
- const char* ret = getenv("TEST_TMPDIR");
53
- if (ret == NULL || ret[0] == '\0') {
54
- #ifdef OS_WIN
55
- ret = getenv("TEMP");
56
- #else
57
- ret = "/tmp";
58
- #endif
59
- }
60
- return ret;
61
- }
62
- #ifdef _MSC_VER
63
- #pragma warning(pop)
64
- #endif
65
-
66
- #define CheckNoError(err) \
67
- if ((err) != NULL) { \
68
- fprintf(stderr, "%s:%d: %s: %s\n", __FILE__, __LINE__, phase, (err)); \
69
- abort(); \
70
- }
71
-
72
- #define CheckCondition(cond) \
73
- if (!(cond)) { \
74
- fprintf(stderr, "%s:%d: %s: %s\n", __FILE__, __LINE__, phase, #cond); \
75
- abort(); \
76
- }
77
-
78
- static void CheckEqual(const char* expected, const char* v, size_t n) {
79
- if (expected == NULL && v == NULL) {
80
- // ok
81
- } else if (expected != NULL && v != NULL && n == strlen(expected) &&
82
- memcmp(expected, v, n) == 0) {
83
- // ok
84
- return;
85
- } else {
86
- fprintf(stderr, "%s: expected '%s', got '%s'\n", phase,
87
- (expected ? expected : "(null)"), (v ? v : "(null)"));
88
- abort();
89
- }
90
- }
91
-
92
- static void Free(char** ptr) {
93
- if (*ptr) {
94
- free(*ptr);
95
- *ptr = NULL;
96
- }
97
- }
98
-
99
- static void CheckValue(char* err, const char* expected, char** actual,
100
- size_t actual_length) {
101
- CheckNoError(err);
102
- CheckEqual(expected, *actual, actual_length);
103
- Free(actual);
104
- }
105
-
106
- static void CheckGet(rocksdb_t* db, const rocksdb_readoptions_t* options,
107
- const char* key, const char* expected) {
108
- char* err = NULL;
109
- size_t val_len;
110
- char* val;
111
- val = rocksdb_get(db, options, key, strlen(key), &val_len, &err);
112
- CheckNoError(err);
113
- CheckEqual(expected, val, val_len);
114
- Free(&val);
115
- }
116
-
117
- static void CheckGetCF(rocksdb_t* db, const rocksdb_readoptions_t* options,
118
- rocksdb_column_family_handle_t* handle, const char* key,
119
- const char* expected) {
120
- char* err = NULL;
121
- size_t val_len;
122
- char* val;
123
- val = rocksdb_get_cf(db, options, handle, key, strlen(key), &val_len, &err);
124
- CheckNoError(err);
125
- CheckEqual(expected, val, val_len);
126
- Free(&val);
127
- }
128
-
129
- static void CheckPinGet(rocksdb_t* db, const rocksdb_readoptions_t* options,
130
- const char* key, const char* expected) {
131
- char* err = NULL;
132
- size_t val_len;
133
- const char* val;
134
- rocksdb_pinnableslice_t* p;
135
- p = rocksdb_get_pinned(db, options, key, strlen(key), &err);
136
- CheckNoError(err);
137
- val = rocksdb_pinnableslice_value(p, &val_len);
138
- CheckEqual(expected, val, val_len);
139
- rocksdb_pinnableslice_destroy(p);
140
- }
141
-
142
- static void CheckPinGetCF(rocksdb_t* db, const rocksdb_readoptions_t* options,
143
- rocksdb_column_family_handle_t* handle,
144
- const char* key, const char* expected) {
145
- char* err = NULL;
146
- size_t val_len;
147
- const char* val;
148
- rocksdb_pinnableslice_t* p;
149
- p = rocksdb_get_pinned_cf(db, options, handle, key, strlen(key), &err);
150
- CheckNoError(err);
151
- val = rocksdb_pinnableslice_value(p, &val_len);
152
- CheckEqual(expected, val, val_len);
153
- rocksdb_pinnableslice_destroy(p);
154
- }
155
-
156
- static void CheckMultiGetValues(size_t num_keys, char** values,
157
- size_t* values_sizes, char** errs,
158
- const char** expected) {
159
- for (size_t i = 0; i < num_keys; i++) {
160
- CheckNoError(errs[i]);
161
- CheckEqual(expected[i], values[i], values_sizes[i]);
162
- Free(&values[i]);
163
- }
164
- }
165
-
166
- static void CheckIter(rocksdb_iterator_t* iter, const char* key,
167
- const char* val) {
168
- size_t len;
169
- const char* str;
170
- str = rocksdb_iter_key(iter, &len);
171
- CheckEqual(key, str, len);
172
- str = rocksdb_iter_value(iter, &len);
173
- CheckEqual(val, str, len);
174
- }
175
-
176
- // Callback from rocksdb_writebatch_iterate()
177
- static void CheckPut(void* ptr, const char* k, size_t klen, const char* v,
178
- size_t vlen) {
179
- int* state = (int*)ptr;
180
- CheckCondition(*state < 2);
181
- switch (*state) {
182
- case 0:
183
- CheckEqual("bar", k, klen);
184
- CheckEqual("b", v, vlen);
185
- break;
186
- case 1:
187
- CheckEqual("box", k, klen);
188
- CheckEqual("c", v, vlen);
189
- break;
190
- }
191
- (*state)++;
192
- }
193
-
194
- // Callback from rocksdb_writebatch_iterate()
195
- static void CheckDel(void* ptr, const char* k, size_t klen) {
196
- int* state = (int*)ptr;
197
- CheckCondition(*state == 2);
198
- CheckEqual("bar", k, klen);
199
- (*state)++;
200
- }
201
-
202
- // Callback from rocksdb_writebatch_iterate_cf()
203
- static void CheckPutCF(void* ptr, uint32_t cfid, const char* k, size_t klen,
204
- const char* v, size_t vlen) {
205
- int* state = (int*)ptr;
206
- switch (*state) {
207
- case 0:
208
- CheckEqual("bar", k, klen);
209
- CheckEqual("b", v, vlen);
210
- CheckCondition(cfid == 1);
211
- break;
212
- case 1:
213
- CheckEqual("box", k, klen);
214
- CheckEqual("c", v, vlen);
215
- CheckCondition(cfid == 1);
216
- break;
217
- case 4:
218
- CheckEqual("foo", k, klen);
219
- CheckEqual("f", v, vlen);
220
- CheckCondition(cfid == 0);
221
- break;
222
- case 6:
223
- CheckEqual("baz", k, klen);
224
- CheckEqual("a", v, vlen);
225
- CheckCondition(cfid == 0);
226
- break;
227
- default:
228
- CheckCondition(false);
229
- break;
230
- }
231
- (*state)++;
232
- }
233
-
234
- // Callback from rocksdb_writebatch_iterate_cf()
235
- static void CheckDelCF(void* ptr, uint32_t cfid, const char* k, size_t klen) {
236
- int* state = (int*)ptr;
237
- switch (*state) {
238
- case 2:
239
- CheckEqual("bar", k, klen);
240
- CheckCondition(cfid == 1);
241
- break;
242
- case 5:
243
- CheckEqual("foo", k, klen);
244
- CheckCondition(cfid == 0);
245
- break;
246
- default:
247
- CheckCondition(false);
248
- break;
249
- }
250
- (*state)++;
251
- }
252
-
253
- // Callback from rocksdb_writebatch_iterate_cf()
254
- static void CheckMergeCF(void* ptr, uint32_t cfid, const char* k, size_t klen,
255
- const char* v, size_t vlen) {
256
- int* state = (int*)ptr;
257
- switch (*state) {
258
- case 3:
259
- CheckEqual("box", k, klen);
260
- CheckEqual("cc", v, vlen);
261
- CheckCondition(cfid == 1);
262
- break;
263
- case 7:
264
- CheckEqual("baz", k, klen);
265
- CheckEqual("aa", v, vlen);
266
- CheckCondition(cfid == 0);
267
- break;
268
- default:
269
- CheckCondition(false);
270
- break;
271
- }
272
- (*state)++;
273
- }
274
-
275
- static void CmpDestroy(void* arg) { (void)arg; }
276
-
277
- static int CmpCompare(void* arg, const char* a, size_t alen, const char* b,
278
- size_t blen) {
279
- (void)arg;
280
- size_t n = (alen < blen) ? alen : blen;
281
- int r = memcmp(a, b, n);
282
- if (r == 0) {
283
- if (alen < blen) {
284
- r = -1;
285
- } else if (alen > blen) {
286
- r = +1;
287
- }
288
- }
289
- return r;
290
- }
291
-
292
- static const char* CmpName(void* arg) {
293
- (void)arg;
294
- return "foo";
295
- }
296
-
297
- // Custom compaction filter
298
- static void CFilterDestroy(void* arg) { (void)arg; }
299
- static const char* CFilterName(void* arg) {
300
- (void)arg;
301
- return "foo";
302
- }
303
- static unsigned char CFilterFilter(void* arg, int level, const char* key,
304
- size_t key_length,
305
- const char* existing_value,
306
- size_t value_length, char** new_value,
307
- size_t* new_value_length,
308
- unsigned char* value_changed) {
309
- (void)arg;
310
- (void)level;
311
- (void)existing_value;
312
- (void)value_length;
313
- if (key_length == 3) {
314
- if (memcmp(key, "bar", key_length) == 0) {
315
- return 1;
316
- } else if (memcmp(key, "baz", key_length) == 0) {
317
- *value_changed = 1;
318
- *new_value = "newbazvalue";
319
- *new_value_length = 11;
320
- return 0;
321
- }
322
- }
323
- return 0;
324
- }
325
-
326
- static void CFilterFactoryDestroy(void* arg) { (void)arg; }
327
- static const char* CFilterFactoryName(void* arg) {
328
- (void)arg;
329
- return "foo";
330
- }
331
- static rocksdb_compactionfilter_t* CFilterCreate(
332
- void* arg, rocksdb_compactionfiltercontext_t* context) {
333
- (void)arg;
334
- (void)context;
335
- return rocksdb_compactionfilter_create(NULL, CFilterDestroy, CFilterFilter,
336
- CFilterName);
337
- }
338
-
339
- void CheckMetaData(rocksdb_column_family_metadata_t* cf_meta,
340
- const char* expected_cf_name) {
341
- char* cf_name = rocksdb_column_family_metadata_get_name(cf_meta);
342
- assert(strcmp(cf_name, expected_cf_name) == 0);
343
- rocksdb_free(cf_name);
344
-
345
- size_t cf_size = rocksdb_column_family_metadata_get_size(cf_meta);
346
- assert(cf_size > 0);
347
- size_t cf_file_count = rocksdb_column_family_metadata_get_size(cf_meta);
348
- assert(cf_file_count > 0);
349
-
350
- uint64_t total_level_size = 0;
351
- size_t total_file_count = 0;
352
- size_t level_count = rocksdb_column_family_metadata_get_level_count(cf_meta);
353
- assert(level_count > 0);
354
- for (size_t l = 0; l < level_count; ++l) {
355
- rocksdb_level_metadata_t* level_meta =
356
- rocksdb_column_family_metadata_get_level_metadata(cf_meta, l);
357
- assert(level_meta);
358
- assert(rocksdb_level_metadata_get_level(level_meta) >= (int)l);
359
- uint64_t level_size = rocksdb_level_metadata_get_size(level_meta);
360
- uint64_t file_size_in_level = 0;
361
-
362
- size_t file_count = rocksdb_level_metadata_get_file_count(level_meta);
363
- total_file_count += file_count;
364
- for (size_t f = 0; f < file_count; ++f) {
365
- rocksdb_sst_file_metadata_t* file_meta =
366
- rocksdb_level_metadata_get_sst_file_metadata(level_meta, f);
367
- assert(file_meta);
368
-
369
- uint64_t file_size = rocksdb_sst_file_metadata_get_size(file_meta);
370
- assert(file_size > 0);
371
- file_size_in_level += file_size;
372
-
373
- char* file_name =
374
- rocksdb_sst_file_metadata_get_relative_filename(file_meta);
375
- assert(file_name);
376
- assert(strlen(file_name) > 0);
377
- rocksdb_free(file_name);
378
-
379
- size_t smallest_key_len;
380
- char* smallest_key = rocksdb_sst_file_metadata_get_smallestkey(
381
- file_meta, &smallest_key_len);
382
- assert(smallest_key);
383
- assert(smallest_key_len > 0);
384
- size_t largest_key_len;
385
- char* largest_key =
386
- rocksdb_sst_file_metadata_get_largestkey(file_meta, &largest_key_len);
387
- assert(largest_key);
388
- assert(largest_key_len > 0);
389
- rocksdb_free(smallest_key);
390
- rocksdb_free(largest_key);
391
-
392
- rocksdb_sst_file_metadata_destroy(file_meta);
393
- }
394
- assert(level_size == file_size_in_level);
395
- total_level_size += level_size;
396
- rocksdb_level_metadata_destroy(level_meta);
397
- }
398
- assert(total_file_count > 0);
399
- assert(cf_size == total_level_size);
400
- }
401
-
402
- void GetAndCheckMetaData(rocksdb_t* db) {
403
- rocksdb_column_family_metadata_t* cf_meta =
404
- rocksdb_get_column_family_metadata(db);
405
-
406
- CheckMetaData(cf_meta, "default");
407
-
408
- rocksdb_column_family_metadata_destroy(cf_meta);
409
- }
410
-
411
- void GetAndCheckMetaDataCf(rocksdb_t* db,
412
- rocksdb_column_family_handle_t* handle,
413
- const char* cf_name) {
414
- // Compact to make sure we have at least one sst file to obtain datadata.
415
- rocksdb_compact_range_cf(db, handle, NULL, 0, NULL, 0);
416
-
417
- rocksdb_column_family_metadata_t* cf_meta =
418
- rocksdb_get_column_family_metadata_cf(db, handle);
419
-
420
- CheckMetaData(cf_meta, cf_name);
421
-
422
- rocksdb_column_family_metadata_destroy(cf_meta);
423
- }
424
-
425
- static rocksdb_t* CheckCompaction(rocksdb_t* db, rocksdb_options_t* options,
426
- rocksdb_readoptions_t* roptions,
427
- rocksdb_writeoptions_t* woptions) {
428
- char* err = NULL;
429
- db = rocksdb_open(options, dbname, &err);
430
- CheckNoError(err);
431
- rocksdb_put(db, woptions, "foo", 3, "foovalue", 8, &err);
432
- CheckNoError(err);
433
- CheckGet(db, roptions, "foo", "foovalue");
434
- rocksdb_put(db, woptions, "bar", 3, "barvalue", 8, &err);
435
- CheckNoError(err);
436
- CheckGet(db, roptions, "bar", "barvalue");
437
- rocksdb_put(db, woptions, "baz", 3, "bazvalue", 8, &err);
438
- CheckNoError(err);
439
- CheckGet(db, roptions, "baz", "bazvalue");
440
-
441
- // Disable compaction
442
- rocksdb_disable_manual_compaction(db);
443
- rocksdb_compact_range(db, NULL, 0, NULL, 0);
444
- // should not filter anything when disabled
445
- CheckGet(db, roptions, "foo", "foovalue");
446
- CheckGet(db, roptions, "bar", "barvalue");
447
- CheckGet(db, roptions, "baz", "bazvalue");
448
- // Reenable compaction
449
- rocksdb_enable_manual_compaction(db);
450
-
451
- // Force compaction
452
- rocksdb_compact_range(db, NULL, 0, NULL, 0);
453
- rocksdb_wait_for_compact_options_t* wco;
454
- wco = rocksdb_wait_for_compact_options_create();
455
- rocksdb_wait_for_compact(db, wco, &err);
456
- CheckNoError(err);
457
- rocksdb_wait_for_compact_options_destroy(wco);
458
- // should have filtered bar, but not foo
459
- CheckGet(db, roptions, "foo", "foovalue");
460
- CheckGet(db, roptions, "bar", NULL);
461
- CheckGet(db, roptions, "baz", "newbazvalue");
462
-
463
- rocksdb_suggest_compact_range(db, "bar", 3, "foo", 3, &err);
464
- GetAndCheckMetaData(db);
465
- CheckNoError(err);
466
-
467
- return db;
468
- }
469
-
470
- // Custom merge operator
471
- static void MergeOperatorDestroy(void* arg) { (void)arg; }
472
- static const char* MergeOperatorName(void* arg) {
473
- (void)arg;
474
- return "TestMergeOperator";
475
- }
476
- static char* MergeOperatorFullMerge(
477
- void* arg, const char* key, size_t key_length, const char* existing_value,
478
- size_t existing_value_length, const char* const* operands_list,
479
- const size_t* operands_list_length, int num_operands,
480
- unsigned char* success, size_t* new_value_length) {
481
- (void)arg;
482
- (void)key;
483
- (void)key_length;
484
- (void)existing_value;
485
- (void)existing_value_length;
486
- (void)operands_list;
487
- (void)operands_list_length;
488
- (void)num_operands;
489
- *new_value_length = 4;
490
- *success = 1;
491
- char* result = malloc(4);
492
- memcpy(result, "fake", 4);
493
- return result;
494
- }
495
- static char* MergeOperatorPartialMerge(void* arg, const char* key,
496
- size_t key_length,
497
- const char* const* operands_list,
498
- const size_t* operands_list_length,
499
- int num_operands, unsigned char* success,
500
- size_t* new_value_length) {
501
- (void)arg;
502
- (void)key;
503
- (void)key_length;
504
- (void)operands_list;
505
- (void)operands_list_length;
506
- (void)num_operands;
507
- *new_value_length = 4;
508
- *success = 1;
509
- char* result = malloc(4);
510
- memcpy(result, "fake", 4);
511
- return result;
512
- }
513
-
514
- static void CheckTxnGet(rocksdb_transaction_t* txn,
515
- const rocksdb_readoptions_t* options, const char* key,
516
- const char* expected) {
517
- char* err = NULL;
518
- size_t val_len;
519
- char* val;
520
- val = rocksdb_transaction_get(txn, options, key, strlen(key), &val_len, &err);
521
- CheckNoError(err);
522
- CheckEqual(expected, val, val_len);
523
- Free(&val);
524
- }
525
-
526
- static void CheckTxnGetCF(rocksdb_transaction_t* txn,
527
- const rocksdb_readoptions_t* options,
528
- rocksdb_column_family_handle_t* column_family,
529
- const char* key, const char* expected) {
530
- char* err = NULL;
531
- size_t val_len;
532
- char* val;
533
- val = rocksdb_transaction_get_cf(txn, options, column_family, key,
534
- strlen(key), &val_len, &err);
535
- CheckNoError(err);
536
- CheckEqual(expected, val, val_len);
537
- Free(&val);
538
- }
539
-
540
- static void CheckTxnPinGet(rocksdb_transaction_t* txn,
541
- const rocksdb_readoptions_t* options,
542
- const char* key, const char* expected) {
543
- rocksdb_pinnableslice_t* p = NULL;
544
- const char* val = NULL;
545
- char* err = NULL;
546
- size_t val_len;
547
- p = rocksdb_transaction_get_pinned(txn, options, key, strlen(key), &err);
548
- CheckNoError(err);
549
- val = rocksdb_pinnableslice_value(p, &val_len);
550
- CheckEqual(expected, val, val_len);
551
- rocksdb_pinnableslice_destroy(p);
552
- }
553
-
554
- static void CheckTxnPinGetCF(rocksdb_transaction_t* txn,
555
- const rocksdb_readoptions_t* options,
556
- rocksdb_column_family_handle_t* column_family,
557
- const char* key, const char* expected) {
558
- rocksdb_pinnableslice_t* p = NULL;
559
- const char* val = NULL;
560
- char* err = NULL;
561
- size_t val_len;
562
- p = rocksdb_transaction_get_pinned_cf(txn, options, column_family, key,
563
- strlen(key), &err);
564
- CheckNoError(err);
565
- val = rocksdb_pinnableslice_value(p, &val_len);
566
- CheckEqual(expected, val, val_len);
567
- rocksdb_pinnableslice_destroy(p);
568
- }
569
-
570
- static void CheckTxnGetForUpdate(rocksdb_transaction_t* txn,
571
- const rocksdb_readoptions_t* options,
572
- const char* key, const char* expected) {
573
- char* err = NULL;
574
- size_t val_len;
575
- char* val;
576
- val = rocksdb_transaction_get_for_update(txn, options, key, strlen(key),
577
- &val_len, true, &err);
578
- CheckNoError(err);
579
- CheckEqual(expected, val, val_len);
580
- Free(&val);
581
- }
582
-
583
- static void CheckTxnDBGet(rocksdb_transactiondb_t* txn_db,
584
- const rocksdb_readoptions_t* options, const char* key,
585
- const char* expected) {
586
- char* err = NULL;
587
- size_t val_len;
588
- char* val;
589
- val = rocksdb_transactiondb_get(txn_db, options, key, strlen(key), &val_len,
590
- &err);
591
- CheckNoError(err);
592
- CheckEqual(expected, val, val_len);
593
- Free(&val);
594
- }
595
-
596
- static void CheckTxnDBGetCF(rocksdb_transactiondb_t* txn_db,
597
- const rocksdb_readoptions_t* options,
598
- rocksdb_column_family_handle_t* column_family,
599
- const char* key, const char* expected) {
600
- char* err = NULL;
601
- size_t val_len;
602
- char* val;
603
- val = rocksdb_transactiondb_get_cf(txn_db, options, column_family, key,
604
- strlen(key), &val_len, &err);
605
- CheckNoError(err);
606
- CheckEqual(expected, val, val_len);
607
- Free(&val);
608
- }
609
-
610
- static void CheckTxnGetForUpdateCF(
611
- rocksdb_transaction_t* txn, const rocksdb_readoptions_t* options,
612
- rocksdb_column_family_handle_t* column_family, const char* key,
613
- const char* expected) {
614
- char* err = NULL;
615
- size_t val_len;
616
- char* val;
617
- val = rocksdb_transaction_get_for_update_cf(
618
- txn, options, column_family, key, strlen(key), &val_len, true, &err);
619
- CheckNoError(err);
620
- CheckEqual(expected, val, val_len);
621
- Free(&val);
622
- }
623
-
624
- static void CheckTxnDBPinGet(rocksdb_transactiondb_t* txn_db,
625
- const rocksdb_readoptions_t* options,
626
- const char* key, const char* expected) {
627
- rocksdb_pinnableslice_t* p = NULL;
628
- const char* val = NULL;
629
- char* err = NULL;
630
- size_t val_len;
631
- p = rocksdb_transactiondb_get_pinned(txn_db, options, key, strlen(key), &err);
632
- CheckNoError(err);
633
- val = rocksdb_pinnableslice_value(p, &val_len);
634
- CheckEqual(expected, val, val_len);
635
- rocksdb_pinnableslice_destroy(p);
636
- }
637
-
638
- static void CheckTxnDBPinGetCF(rocksdb_transactiondb_t* txn_db,
639
- const rocksdb_readoptions_t* options,
640
- rocksdb_column_family_handle_t* column_family,
641
- const char* key, const char* expected) {
642
- rocksdb_pinnableslice_t* p = NULL;
643
- const char* val = NULL;
644
- char* err = NULL;
645
- size_t val_len;
646
- p = rocksdb_transactiondb_get_pinned_cf(txn_db, options, column_family, key,
647
- strlen(key), &err);
648
- CheckNoError(err);
649
- val = rocksdb_pinnableslice_value(p, &val_len);
650
- CheckEqual(expected, val, val_len);
651
- rocksdb_pinnableslice_destroy(p);
652
- }
653
-
654
- static void LoadAndCheckLatestOptions(const char* db_name, rocksdb_env_t* env,
655
- bool ignore_unknown_options,
656
- rocksdb_cache_t* cache,
657
- rocksdb_comparator_t* cmp,
658
- const size_t expected_num_column_families,
659
- const char** expected_cf_names,
660
- const char* expected_open_err) {
661
- rocksdb_options_t* db_options;
662
- size_t num_column_families;
663
- char** list_column_family_names;
664
- rocksdb_options_t** list_column_family_options;
665
- char* err = 0;
666
-
667
- // load the latest rocksdb option
668
- rocksdb_load_latest_options(db_name, env, ignore_unknown_options, cache,
669
- &db_options, &num_column_families,
670
- &list_column_family_names,
671
- &list_column_family_options, &err);
672
- assert(num_column_families == expected_num_column_families);
673
- CheckNoError(err);
674
-
675
- // verify the loaded options by opening the db.
676
- rocksdb_options_set_error_if_exists(db_options, 0);
677
-
678
- char** list_const_cf_names =
679
- (char**)malloc(num_column_families * sizeof(char*));
680
- rocksdb_options_t** list_const_cf_options = (rocksdb_options_t**)malloc(
681
- num_column_families * sizeof(rocksdb_options_t*));
682
- for (size_t i = 0; i < num_column_families; ++i) {
683
- assert(strcmp(list_column_family_names[i], expected_cf_names[i]) == 0);
684
- list_const_cf_names[i] = list_column_family_names[i];
685
- if (cmp) {
686
- rocksdb_options_set_comparator(list_column_family_options[i], cmp);
687
- }
688
- list_const_cf_options[i] = list_column_family_options[i];
689
- }
690
- rocksdb_column_family_handle_t** handles =
691
- (rocksdb_column_family_handle_t**)malloc(
692
- num_column_families * sizeof(rocksdb_column_family_handle_t*));
693
-
694
- rocksdb_t* db = rocksdb_open_column_families(
695
- db_options, db_name, (int)num_column_families,
696
- (const char* const*)list_const_cf_names,
697
- (const rocksdb_options_t* const*)list_const_cf_options, handles, &err);
698
- if (expected_open_err == NULL) {
699
- CheckNoError(err);
700
- for (size_t i = 0; i < num_column_families; ++i) {
701
- rocksdb_column_family_handle_destroy(handles[i]);
702
- }
703
- free(handles);
704
- rocksdb_close(db);
705
- } else {
706
- assert(err != NULL);
707
- assert(strcmp(err, expected_open_err) == 0);
708
- free(handles);
709
- free(err);
710
- }
711
-
712
- free(list_const_cf_names);
713
- free(list_const_cf_options);
714
- rocksdb_load_latest_options_destroy(db_options, list_column_family_names,
715
- list_column_family_options,
716
- num_column_families);
717
- }
718
-
719
- int main(int argc, char** argv) {
720
- (void)argc;
721
- (void)argv;
722
- rocksdb_t* db;
723
- rocksdb_comparator_t* cmp;
724
- rocksdb_cache_t* cache;
725
- rocksdb_dbpath_t* dbpath;
726
- rocksdb_env_t* env;
727
- rocksdb_options_t* options;
728
- rocksdb_compactoptions_t* coptions;
729
- rocksdb_block_based_table_options_t* table_options;
730
- rocksdb_readoptions_t* roptions;
731
- rocksdb_writeoptions_t* woptions;
732
- rocksdb_ratelimiter_t* rate_limiter;
733
- rocksdb_transactiondb_t* txn_db;
734
- rocksdb_transactiondb_options_t* txn_db_options;
735
- rocksdb_transaction_t* txn;
736
- rocksdb_transaction_options_t* txn_options;
737
- rocksdb_optimistictransactiondb_t* otxn_db;
738
- rocksdb_optimistictransaction_options_t* otxn_options;
739
- char* err = NULL;
740
- int run = -1;
741
-
742
- snprintf(dbname, sizeof(dbname), "%s/rocksdb_c_test-%d", GetTempDir(),
743
- ((int)geteuid()));
744
-
745
- snprintf(dbbackupname, sizeof(dbbackupname), "%s/rocksdb_c_test-%d-backup",
746
- GetTempDir(), ((int)geteuid()));
747
-
748
- snprintf(dbcheckpointname, sizeof(dbcheckpointname),
749
- "%s/rocksdb_c_test-%d-checkpoint", GetTempDir(), ((int)geteuid()));
750
-
751
- snprintf(sstfilename, sizeof(sstfilename), "%s/rocksdb_c_test-%d-sst",
752
- GetTempDir(), ((int)geteuid()));
753
-
754
- snprintf(dbpathname, sizeof(dbpathname), "%s/rocksdb_c_test-%d-dbpath",
755
- GetTempDir(), ((int)geteuid()));
756
-
757
- StartPhase("create_objects");
758
- cmp = rocksdb_comparator_create(NULL, CmpDestroy, CmpCompare, CmpName);
759
- dbpath = rocksdb_dbpath_create(dbpathname, 1024 * 1024);
760
- env = rocksdb_create_default_env();
761
-
762
- rocksdb_create_dir_if_missing(env, GetTempDir(), &err);
763
- CheckNoError(err);
764
-
765
- cache = rocksdb_cache_create_lru(100000);
766
-
767
- options = rocksdb_options_create();
768
- rocksdb_options_set_comparator(options, cmp);
769
- rocksdb_options_set_error_if_exists(options, 1);
770
- rocksdb_options_set_env(options, env);
771
- rocksdb_options_set_info_log(options, NULL);
772
- rocksdb_options_set_write_buffer_size(options, 100000);
773
- rocksdb_options_set_paranoid_checks(options, 1);
774
- rocksdb_options_set_max_open_files(options, 10);
775
-
776
- table_options = rocksdb_block_based_options_create();
777
- rocksdb_block_based_options_set_block_cache(table_options, cache);
778
- rocksdb_block_based_options_set_data_block_index_type(table_options, 1);
779
- rocksdb_block_based_options_set_data_block_hash_ratio(table_options, 0.75);
780
- rocksdb_block_based_options_set_top_level_index_pinning_tier(table_options,
781
- 1);
782
- rocksdb_block_based_options_set_partition_pinning_tier(table_options, 2);
783
- rocksdb_block_based_options_set_unpartitioned_pinning_tier(table_options, 3);
784
- rocksdb_options_set_block_based_table_factory(options, table_options);
785
-
786
- rocksdb_options_set_compression(options, rocksdb_no_compression);
787
- rocksdb_options_set_compression_options(options, -14, -1, 0, 0);
788
- int compression_levels[] = {rocksdb_no_compression, rocksdb_no_compression,
789
- rocksdb_no_compression, rocksdb_no_compression};
790
- rocksdb_options_set_compression_per_level(options, compression_levels, 4);
791
- rate_limiter = rocksdb_ratelimiter_create(1000 * 1024 * 1024, 100 * 1000, 10);
792
- rocksdb_options_set_ratelimiter(options, rate_limiter);
793
- rocksdb_ratelimiter_destroy(rate_limiter);
794
-
795
- rate_limiter =
796
- rocksdb_ratelimiter_create_auto_tuned(1000 * 1024 * 1024, 100 * 1000, 10);
797
- rocksdb_options_set_ratelimiter(options, rate_limiter);
798
- rocksdb_ratelimiter_destroy(rate_limiter);
799
-
800
- rate_limiter = rocksdb_ratelimiter_create_with_mode(1000 * 1024 * 1024,
801
- 100 * 1000, 10, 0, true);
802
- rocksdb_options_set_ratelimiter(options, rate_limiter);
803
- rocksdb_ratelimiter_destroy(rate_limiter);
804
-
805
- roptions = rocksdb_readoptions_create();
806
- rocksdb_readoptions_set_verify_checksums(roptions, 1);
807
- rocksdb_readoptions_set_fill_cache(roptions, 1);
808
-
809
- woptions = rocksdb_writeoptions_create();
810
- rocksdb_writeoptions_set_sync(woptions, 1);
811
-
812
- coptions = rocksdb_compactoptions_create();
813
- rocksdb_compactoptions_set_exclusive_manual_compaction(coptions, 1);
814
-
815
- rocksdb_options_add_compact_on_deletion_collector_factory(options, 10000,
816
- 10001);
817
- rocksdb_options_add_compact_on_deletion_collector_factory_del_ratio(
818
- options, 10000, 10001, 0.0);
819
-
820
- StartPhase("destroy");
821
- rocksdb_destroy_db(options, dbname, &err);
822
- Free(&err);
823
-
824
- StartPhase("open_error");
825
- rocksdb_open(options, dbname, &err);
826
- CheckCondition(err != NULL);
827
- Free(&err);
828
-
829
- StartPhase("open");
830
- rocksdb_options_set_create_if_missing(options, 1);
831
- db = rocksdb_open(options, dbname, &err);
832
- CheckNoError(err);
833
- CheckGet(db, roptions, "foo", NULL);
834
-
835
- StartPhase("put");
836
- rocksdb_put(db, woptions, "foo", 3, "hello", 5, &err);
837
- CheckNoError(err);
838
- CheckGet(db, roptions, "foo", "hello");
839
-
840
- StartPhase("backup_and_restore");
841
- {
842
- rocksdb_destroy_db(options, dbbackupname, &err);
843
- CheckNoError(err);
844
-
845
- rocksdb_backup_engine_t* be =
846
- rocksdb_backup_engine_open(options, dbbackupname, &err);
847
- CheckNoError(err);
848
-
849
- rocksdb_backup_engine_create_new_backup(be, db, &err);
850
- CheckNoError(err);
851
-
852
- // need a change to trigger a new backup
853
- rocksdb_delete(db, woptions, "does-not-exist", 14, &err);
854
- CheckNoError(err);
855
-
856
- rocksdb_backup_engine_create_new_backup(be, db, &err);
857
- CheckNoError(err);
858
-
859
- const rocksdb_backup_engine_info_t* bei =
860
- rocksdb_backup_engine_get_backup_info(be);
861
- CheckCondition(rocksdb_backup_engine_info_count(bei) > 1);
862
- rocksdb_backup_engine_info_destroy(bei);
863
-
864
- rocksdb_backup_engine_purge_old_backups(be, 1, &err);
865
- CheckNoError(err);
866
-
867
- bei = rocksdb_backup_engine_get_backup_info(be);
868
- CheckCondition(rocksdb_backup_engine_info_count(bei) == 1);
869
- rocksdb_backup_engine_info_destroy(bei);
870
-
871
- rocksdb_delete(db, woptions, "foo", 3, &err);
872
- CheckNoError(err);
873
-
874
- // get the identity before the backup
875
- size_t before_db_id_len = 0;
876
- char* before_db_id = rocksdb_get_db_identity(db, &before_db_id_len);
877
- CheckCondition(before_db_id_len == 36);
878
-
879
- rocksdb_close(db);
880
-
881
- rocksdb_destroy_db(options, dbname, &err);
882
- CheckNoError(err);
883
-
884
- rocksdb_restore_options_t* restore_options =
885
- rocksdb_restore_options_create();
886
- rocksdb_restore_options_set_keep_log_files(restore_options, 0);
887
- rocksdb_backup_engine_restore_db_from_latest_backup(be, dbname, dbname,
888
- restore_options, &err);
889
- CheckNoError(err);
890
- rocksdb_restore_options_destroy(restore_options);
891
-
892
- rocksdb_options_set_error_if_exists(options, 0);
893
- db = rocksdb_open(options, dbname, &err);
894
- CheckNoError(err);
895
- rocksdb_options_set_error_if_exists(options, 1);
896
-
897
- CheckGet(db, roptions, "foo", "hello");
898
-
899
- // the db_identity after the backup is different
900
- size_t after_db_id_len = 0;
901
- char* after_db_id = rocksdb_get_db_identity(db, &after_db_id_len);
902
- CheckCondition(after_db_id_len == 36);
903
- CheckCondition(memcmp(after_db_id, before_db_id, after_db_id_len) != 0);
904
- Free(&before_db_id);
905
- Free(&after_db_id);
906
-
907
- rocksdb_backup_engine_close(be);
908
- }
909
-
910
- StartPhase("checkpoint");
911
- {
912
- rocksdb_destroy_db(options, dbcheckpointname, &err);
913
- CheckNoError(err);
914
-
915
- rocksdb_checkpoint_t* checkpoint =
916
- rocksdb_checkpoint_object_create(db, &err);
917
- CheckNoError(err);
918
-
919
- rocksdb_checkpoint_create(checkpoint, dbcheckpointname, 0, &err);
920
- CheckNoError(err);
921
-
922
- rocksdb_checkpoint_object_destroy(checkpoint);
923
- checkpoint = NULL;
924
-
925
- // get the identity before the checkpoint
926
- size_t before_db_id_len = 0;
927
- char* before_db_id = rocksdb_get_db_identity(db, &before_db_id_len);
928
- CheckCondition(before_db_id_len == 36);
929
-
930
- // start a new database from the checkpoint
931
- rocksdb_close(db);
932
- rocksdb_options_set_error_if_exists(options, 0);
933
- db = rocksdb_open(options, dbcheckpointname, &err);
934
- CheckNoError(err);
935
-
936
- CheckGet(db, roptions, "foo", "hello");
937
-
938
- // the db_identity after the checkpoint is different
939
- size_t after_db_id_len = 0;
940
- char* after_db_id = rocksdb_get_db_identity(db, &after_db_id_len);
941
- CheckCondition(after_db_id_len == 36);
942
- CheckCondition(memcmp(after_db_id, before_db_id, after_db_id_len) != 0);
943
- Free(&before_db_id);
944
- Free(&after_db_id);
945
-
946
- rocksdb_close(db);
947
- rocksdb_destroy_db(options, dbcheckpointname, &err);
948
- CheckNoError(err);
949
-
950
- db = rocksdb_open(options, dbname, &err);
951
- CheckNoError(err);
952
- rocksdb_options_set_error_if_exists(options, 1);
953
- }
954
-
955
- StartPhase("checkpoint_db_id_in_manifest");
956
- {
957
- // create new DB with set_write_dbid_to_manifest=true
958
- // db_identity is now the same across checkpoints
959
- rocksdb_close(db);
960
- db = NULL;
961
-
962
- rocksdb_options_t* options_dbid_in_manifest = rocksdb_options_create();
963
- rocksdb_options_set_create_if_missing(options_dbid_in_manifest, 1);
964
-
965
- unsigned char write_to_manifest =
966
- rocksdb_options_get_write_dbid_to_manifest(options_dbid_in_manifest);
967
- CheckCondition(!write_to_manifest);
968
- rocksdb_options_set_write_dbid_to_manifest(options_dbid_in_manifest, true);
969
- CheckCondition(!write_to_manifest);
970
- write_to_manifest =
971
- rocksdb_options_get_write_dbid_to_manifest(options_dbid_in_manifest);
972
- CheckCondition(write_to_manifest);
973
-
974
- db = rocksdb_open(options_dbid_in_manifest, dbbackupname, &err);
975
- CheckNoError(err);
976
-
977
- rocksdb_checkpoint_t* checkpoint =
978
- rocksdb_checkpoint_object_create(db, &err);
979
- CheckNoError(err);
980
-
981
- rocksdb_checkpoint_create(checkpoint, dbcheckpointname, 0, &err);
982
- CheckNoError(err);
983
-
984
- rocksdb_checkpoint_object_destroy(checkpoint);
985
- checkpoint = NULL;
986
-
987
- // get the identity before the backup
988
- size_t before_db_id_len = 0;
989
- char* before_db_id = rocksdb_get_db_identity(db, &before_db_id_len);
990
- CheckCondition(before_db_id_len == 36);
991
-
992
- // open the checkpoint
993
- rocksdb_close(db);
994
- rocksdb_destroy_db(options_dbid_in_manifest, dbbackupname, &err);
995
- CheckNoError(err);
996
-
997
- rocksdb_options_set_error_if_exists(options_dbid_in_manifest, 0);
998
- db = rocksdb_open(options_dbid_in_manifest, dbcheckpointname, &err);
999
- CheckNoError(err);
1000
-
1001
- // the db_identity after the checkpoint is the same
1002
- size_t after_db_id_len = 0;
1003
- char* after_db_id = rocksdb_get_db_identity(db, &after_db_id_len);
1004
- CheckCondition(after_db_id_len == 36);
1005
- CheckCondition(memcmp(after_db_id, before_db_id, after_db_id_len) == 0);
1006
- Free(&before_db_id);
1007
- Free(&after_db_id);
1008
-
1009
- rocksdb_close(db);
1010
- rocksdb_destroy_db(options_dbid_in_manifest, dbcheckpointname, &err);
1011
- CheckNoError(err);
1012
- rocksdb_options_destroy(options_dbid_in_manifest);
1013
- options_dbid_in_manifest = NULL;
1014
-
1015
- // re-open the default database
1016
- rocksdb_options_set_error_if_exists(options, 0);
1017
- db = rocksdb_open(options, dbname, &err);
1018
- CheckNoError(err);
1019
- rocksdb_options_set_error_if_exists(options, 1);
1020
- }
1021
-
1022
- StartPhase("compactall");
1023
- rocksdb_compact_range(db, NULL, 0, NULL, 0);
1024
- CheckGet(db, roptions, "foo", "hello");
1025
-
1026
- StartPhase("compactrange");
1027
- rocksdb_compact_range(db, "a", 1, "z", 1);
1028
- CheckGet(db, roptions, "foo", "hello");
1029
-
1030
- StartPhase("compactallopt");
1031
- rocksdb_compact_range_opt(db, coptions, NULL, 0, NULL, 0);
1032
- CheckGet(db, roptions, "foo", "hello");
1033
-
1034
- StartPhase("compactrangeopt");
1035
- rocksdb_compact_range_opt(db, coptions, "a", 1, "z", 1);
1036
- CheckGet(db, roptions, "foo", "hello");
1037
-
1038
- // Simple check cache usage
1039
- StartPhase("cache_usage");
1040
- {
1041
- rocksdb_readoptions_set_pin_data(roptions, 1);
1042
- rocksdb_iterator_t* iter = rocksdb_create_iterator(db, roptions);
1043
- rocksdb_iter_seek(iter, "foo", 3);
1044
-
1045
- size_t usage = rocksdb_cache_get_usage(cache);
1046
- CheckCondition(usage > 0);
1047
-
1048
- size_t pin_usage = rocksdb_cache_get_pinned_usage(cache);
1049
- CheckCondition(pin_usage > 0);
1050
-
1051
- rocksdb_iter_next(iter);
1052
- rocksdb_iter_destroy(iter);
1053
- rocksdb_readoptions_set_pin_data(roptions, 0);
1054
- }
1055
-
1056
- StartPhase("addfile");
1057
- {
1058
- rocksdb_envoptions_t* env_opt = rocksdb_envoptions_create();
1059
- rocksdb_sstfilewriter_t* writer =
1060
- rocksdb_sstfilewriter_create(env_opt, options);
1061
-
1062
- remove(sstfilename);
1063
- rocksdb_sstfilewriter_open(writer, sstfilename, &err);
1064
- CheckNoError(err);
1065
- rocksdb_sstfilewriter_put(writer, "sstk1", 5, "v1", 2, &err);
1066
- CheckNoError(err);
1067
- rocksdb_sstfilewriter_put(writer, "sstk2", 5, "v2", 2, &err);
1068
- CheckNoError(err);
1069
- rocksdb_sstfilewriter_put(writer, "sstk3", 5, "v3", 2, &err);
1070
- CheckNoError(err);
1071
- rocksdb_sstfilewriter_finish(writer, &err);
1072
- CheckNoError(err);
1073
-
1074
- rocksdb_ingestexternalfileoptions_t* ing_opt =
1075
- rocksdb_ingestexternalfileoptions_create();
1076
- const char* file_list[1] = {sstfilename};
1077
- rocksdb_ingest_external_file(db, file_list, 1, ing_opt, &err);
1078
- CheckNoError(err);
1079
- CheckGet(db, roptions, "sstk1", "v1");
1080
- CheckGet(db, roptions, "sstk2", "v2");
1081
- CheckGet(db, roptions, "sstk3", "v3");
1082
-
1083
- remove(sstfilename);
1084
- rocksdb_sstfilewriter_open(writer, sstfilename, &err);
1085
- CheckNoError(err);
1086
- rocksdb_sstfilewriter_put(writer, "sstk2", 5, "v4", 2, &err);
1087
- CheckNoError(err);
1088
- rocksdb_sstfilewriter_put(writer, "sstk22", 6, "v5", 2, &err);
1089
- CheckNoError(err);
1090
- rocksdb_sstfilewriter_put(writer, "sstk3", 5, "v6", 2, &err);
1091
- CheckNoError(err);
1092
- rocksdb_sstfilewriter_finish(writer, &err);
1093
- CheckNoError(err);
1094
-
1095
- rocksdb_ingest_external_file(db, file_list, 1, ing_opt, &err);
1096
- CheckNoError(err);
1097
- CheckGet(db, roptions, "sstk1", "v1");
1098
- CheckGet(db, roptions, "sstk2", "v4");
1099
- CheckGet(db, roptions, "sstk22", "v5");
1100
- CheckGet(db, roptions, "sstk3", "v6");
1101
-
1102
- rocksdb_sstfilewriter_open(writer, sstfilename, &err);
1103
- CheckNoError(err);
1104
- rocksdb_sstfilewriter_put(writer, "abc1", 4, "v7", 2, &err);
1105
- CheckNoError(err);
1106
- rocksdb_sstfilewriter_put(writer, "abc2", 4, "v8", 2, &err);
1107
- CheckNoError(err);
1108
- rocksdb_sstfilewriter_put(writer, "abc3", 4, "v9", 2, &err);
1109
- CheckNoError(err);
1110
- rocksdb_sstfilewriter_put(writer, "abc4", 4, "v10", 3, &err);
1111
- CheckNoError(err);
1112
- rocksdb_sstfilewriter_delete_range(writer, "abc1", 4, "abc4", 4, &err);
1113
- CheckNoError(err);
1114
- rocksdb_sstfilewriter_finish(writer, &err);
1115
- CheckNoError(err);
1116
-
1117
- rocksdb_ingestexternalfileoptions_destroy(ing_opt);
1118
- rocksdb_sstfilewriter_destroy(writer);
1119
- rocksdb_envoptions_destroy(env_opt);
1120
-
1121
- // Delete all keys we just ingested
1122
- rocksdb_delete(db, woptions, "sstk1", 5, &err);
1123
- CheckNoError(err);
1124
- rocksdb_delete(db, woptions, "sstk2", 5, &err);
1125
- CheckNoError(err);
1126
- rocksdb_delete(db, woptions, "sstk22", 6, &err);
1127
- CheckNoError(err);
1128
- rocksdb_delete(db, woptions, "sstk3", 5, &err);
1129
- CheckNoError(err);
1130
- }
1131
-
1132
- StartPhase("writebatch");
1133
- {
1134
- rocksdb_writebatch_t* wb = rocksdb_writebatch_create();
1135
- rocksdb_writebatch_put(wb, "foo", 3, "a", 1);
1136
- rocksdb_writebatch_clear(wb);
1137
- rocksdb_writebatch_put(wb, "bar", 3, "b", 1);
1138
- rocksdb_writebatch_put(wb, "box", 3, "c", 1);
1139
- rocksdb_writebatch_delete(wb, "bar", 3);
1140
- rocksdb_write(db, woptions, wb, &err);
1141
- CheckNoError(err);
1142
- CheckGet(db, roptions, "foo", "hello");
1143
- CheckGet(db, roptions, "bar", NULL);
1144
- CheckGet(db, roptions, "box", "c");
1145
- int pos = 0;
1146
- rocksdb_writebatch_iterate(wb, &pos, CheckPut, CheckDel);
1147
- CheckCondition(pos == 3);
1148
- rocksdb_writebatch_clear(wb);
1149
- rocksdb_writebatch_put(wb, "bar", 3, "b", 1);
1150
- rocksdb_writebatch_put(wb, "bay", 3, "d", 1);
1151
- rocksdb_writebatch_delete_range(wb, "bar", 3, "bay", 3);
1152
- rocksdb_write(db, woptions, wb, &err);
1153
- CheckNoError(err);
1154
- CheckGet(db, roptions, "bar", NULL);
1155
- CheckGet(db, roptions, "bay", "d");
1156
- rocksdb_writebatch_clear(wb);
1157
- const char* start_list[1] = {"bay"};
1158
- const size_t start_sizes[1] = {3};
1159
- const char* end_list[1] = {"baz"};
1160
- const size_t end_sizes[1] = {3};
1161
- rocksdb_writebatch_delete_rangev(wb, 1, start_list, start_sizes, end_list,
1162
- end_sizes);
1163
- rocksdb_write(db, woptions, wb, &err);
1164
- CheckNoError(err);
1165
- CheckGet(db, roptions, "bay", NULL);
1166
- rocksdb_writebatch_destroy(wb);
1167
- }
1168
-
1169
- StartPhase("writebatch_vectors");
1170
- {
1171
- rocksdb_writebatch_t* wb = rocksdb_writebatch_create();
1172
- const char* k_list[2] = {"z", "ap"};
1173
- const size_t k_sizes[2] = {1, 2};
1174
- const char* v_list[3] = {"x", "y", "z"};
1175
- const size_t v_sizes[3] = {1, 1, 1};
1176
- rocksdb_writebatch_putv(wb, 2, k_list, k_sizes, 3, v_list, v_sizes);
1177
- rocksdb_write(db, woptions, wb, &err);
1178
- CheckNoError(err);
1179
- CheckGet(db, roptions, "zap", "xyz");
1180
- rocksdb_writebatch_delete(wb, "zap", 3);
1181
- rocksdb_write(db, woptions, wb, &err);
1182
- CheckNoError(err);
1183
- CheckGet(db, roptions, "zap", NULL);
1184
- rocksdb_writebatch_destroy(wb);
1185
- }
1186
-
1187
- StartPhase("writebatch_savepoint");
1188
- {
1189
- rocksdb_writebatch_t* wb = rocksdb_writebatch_create();
1190
- rocksdb_writebatch_set_save_point(wb);
1191
- rocksdb_writebatch_set_save_point(wb);
1192
- const char* k_list[2] = {"z", "ap"};
1193
- const size_t k_sizes[2] = {1, 2};
1194
- const char* v_list[3] = {"x", "y", "z"};
1195
- const size_t v_sizes[3] = {1, 1, 1};
1196
- rocksdb_writebatch_pop_save_point(wb, &err);
1197
- CheckNoError(err);
1198
- rocksdb_writebatch_putv(wb, 2, k_list, k_sizes, 3, v_list, v_sizes);
1199
- rocksdb_writebatch_rollback_to_save_point(wb, &err);
1200
- CheckNoError(err);
1201
- rocksdb_write(db, woptions, wb, &err);
1202
- CheckNoError(err);
1203
- CheckGet(db, roptions, "zap", NULL);
1204
- rocksdb_writebatch_destroy(wb);
1205
- }
1206
-
1207
- StartPhase("writebatch_rep");
1208
- {
1209
- rocksdb_writebatch_t* wb1 = rocksdb_writebatch_create();
1210
- rocksdb_writebatch_put(wb1, "baz", 3, "d", 1);
1211
- rocksdb_writebatch_put(wb1, "quux", 4, "e", 1);
1212
- rocksdb_writebatch_delete(wb1, "quux", 4);
1213
- size_t repsize1 = 0;
1214
- const char* rep = rocksdb_writebatch_data(wb1, &repsize1);
1215
- rocksdb_writebatch_t* wb2 = rocksdb_writebatch_create_from(rep, repsize1);
1216
- CheckCondition(rocksdb_writebatch_count(wb1) ==
1217
- rocksdb_writebatch_count(wb2));
1218
- size_t repsize2 = 0;
1219
- CheckCondition(
1220
- memcmp(rep, rocksdb_writebatch_data(wb2, &repsize2), repsize1) == 0);
1221
- rocksdb_writebatch_destroy(wb1);
1222
- rocksdb_writebatch_destroy(wb2);
1223
- }
1224
-
1225
- StartPhase("writebatch_wi");
1226
- {
1227
- rocksdb_writebatch_wi_t* wbi = rocksdb_writebatch_wi_create(0, 1);
1228
- rocksdb_writebatch_wi_put(wbi, "foo", 3, "a", 1);
1229
- rocksdb_writebatch_wi_clear(wbi);
1230
- rocksdb_writebatch_wi_put(wbi, "bar", 3, "b", 1);
1231
- rocksdb_writebatch_wi_put(wbi, "box", 3, "c", 1);
1232
- rocksdb_writebatch_wi_delete(wbi, "bar", 3);
1233
- int count = rocksdb_writebatch_wi_count(wbi);
1234
- CheckCondition(count == 3);
1235
- size_t size;
1236
- char* value;
1237
- value = rocksdb_writebatch_wi_get_from_batch(wbi, options, "box", 3, &size,
1238
- &err);
1239
- CheckValue(err, "c", &value, size);
1240
- value = rocksdb_writebatch_wi_get_from_batch(wbi, options, "bar", 3, &size,
1241
- &err);
1242
- CheckValue(err, NULL, &value, size);
1243
- value = rocksdb_writebatch_wi_get_from_batch_and_db(wbi, db, roptions,
1244
- "foo", 3, &size, &err);
1245
- CheckValue(err, "hello", &value, size);
1246
- value = rocksdb_writebatch_wi_get_from_batch_and_db(wbi, db, roptions,
1247
- "box", 3, &size, &err);
1248
- CheckValue(err, "c", &value, size);
1249
- rocksdb_write_writebatch_wi(db, woptions, wbi, &err);
1250
- CheckNoError(err);
1251
- CheckGet(db, roptions, "foo", "hello");
1252
- CheckGet(db, roptions, "bar", NULL);
1253
- CheckGet(db, roptions, "box", "c");
1254
- int pos = 0;
1255
- rocksdb_writebatch_wi_iterate(wbi, &pos, CheckPut, CheckDel);
1256
- CheckCondition(pos == 3);
1257
- rocksdb_writebatch_wi_clear(wbi);
1258
- rocksdb_writebatch_wi_destroy(wbi);
1259
- }
1260
-
1261
- StartPhase("writebatch_wi_vectors");
1262
- {
1263
- rocksdb_writebatch_wi_t* wb = rocksdb_writebatch_wi_create(0, 1);
1264
- const char* k_list[2] = {"z", "ap"};
1265
- const size_t k_sizes[2] = {1, 2};
1266
- const char* v_list[3] = {"x", "y", "z"};
1267
- const size_t v_sizes[3] = {1, 1, 1};
1268
- rocksdb_writebatch_wi_putv(wb, 2, k_list, k_sizes, 3, v_list, v_sizes);
1269
- rocksdb_write_writebatch_wi(db, woptions, wb, &err);
1270
- CheckNoError(err);
1271
- CheckGet(db, roptions, "zap", "xyz");
1272
- rocksdb_writebatch_wi_delete(wb, "zap", 3);
1273
- rocksdb_write_writebatch_wi(db, woptions, wb, &err);
1274
- CheckNoError(err);
1275
- CheckGet(db, roptions, "zap", NULL);
1276
- rocksdb_writebatch_wi_destroy(wb);
1277
- }
1278
-
1279
- StartPhase("writebatch_wi_savepoint");
1280
- {
1281
- rocksdb_writebatch_wi_t* wb = rocksdb_writebatch_wi_create(0, 1);
1282
- rocksdb_writebatch_wi_set_save_point(wb);
1283
- const char* k_list[2] = {"z", "ap"};
1284
- const size_t k_sizes[2] = {1, 2};
1285
- const char* v_list[3] = {"x", "y", "z"};
1286
- const size_t v_sizes[3] = {1, 1, 1};
1287
- rocksdb_writebatch_wi_putv(wb, 2, k_list, k_sizes, 3, v_list, v_sizes);
1288
- rocksdb_writebatch_wi_rollback_to_save_point(wb, &err);
1289
- CheckNoError(err);
1290
- rocksdb_write_writebatch_wi(db, woptions, wb, &err);
1291
- CheckNoError(err);
1292
- CheckGet(db, roptions, "zap", NULL);
1293
- rocksdb_writebatch_wi_destroy(wb);
1294
- }
1295
-
1296
- StartPhase("iter");
1297
- {
1298
- rocksdb_iterator_t* iter = rocksdb_create_iterator(db, roptions);
1299
- CheckCondition(!rocksdb_iter_valid(iter));
1300
- rocksdb_iter_seek_to_first(iter);
1301
- CheckCondition(rocksdb_iter_valid(iter));
1302
- CheckIter(iter, "box", "c");
1303
- rocksdb_iter_next(iter);
1304
- CheckIter(iter, "foo", "hello");
1305
- rocksdb_iter_prev(iter);
1306
- CheckIter(iter, "box", "c");
1307
- rocksdb_iter_prev(iter);
1308
- CheckCondition(!rocksdb_iter_valid(iter));
1309
- rocksdb_iter_seek_to_last(iter);
1310
- CheckIter(iter, "foo", "hello");
1311
- rocksdb_iter_seek(iter, "b", 1);
1312
- CheckIter(iter, "box", "c");
1313
- rocksdb_iter_seek_for_prev(iter, "g", 1);
1314
- CheckIter(iter, "foo", "hello");
1315
- rocksdb_iter_seek_for_prev(iter, "box", 3);
1316
- CheckIter(iter, "box", "c");
1317
- rocksdb_iter_get_error(iter, &err);
1318
- CheckNoError(err);
1319
- rocksdb_iter_destroy(iter);
1320
- }
1321
-
1322
- StartPhase("wbwi_iter");
1323
- {
1324
- rocksdb_iterator_t* base_iter = rocksdb_create_iterator(db, roptions);
1325
- rocksdb_writebatch_wi_t* wbi = rocksdb_writebatch_wi_create(0, 1);
1326
- rocksdb_writebatch_wi_put(wbi, "bar", 3, "b", 1);
1327
- rocksdb_writebatch_wi_delete(wbi, "foo", 3);
1328
- rocksdb_iterator_t* iter =
1329
- rocksdb_writebatch_wi_create_iterator_with_base(wbi, base_iter);
1330
- CheckCondition(!rocksdb_iter_valid(iter));
1331
- rocksdb_iter_seek_to_first(iter);
1332
- CheckCondition(rocksdb_iter_valid(iter));
1333
- CheckIter(iter, "bar", "b");
1334
- rocksdb_iter_next(iter);
1335
- CheckIter(iter, "box", "c");
1336
- rocksdb_iter_prev(iter);
1337
- CheckIter(iter, "bar", "b");
1338
- rocksdb_iter_prev(iter);
1339
- CheckCondition(!rocksdb_iter_valid(iter));
1340
- rocksdb_iter_seek_to_last(iter);
1341
- CheckIter(iter, "box", "c");
1342
- rocksdb_iter_seek(iter, "b", 1);
1343
- CheckIter(iter, "bar", "b");
1344
- rocksdb_iter_seek_for_prev(iter, "c", 1);
1345
- CheckIter(iter, "box", "c");
1346
- rocksdb_iter_seek_for_prev(iter, "box", 3);
1347
- CheckIter(iter, "box", "c");
1348
- rocksdb_iter_get_error(iter, &err);
1349
- CheckNoError(err);
1350
- rocksdb_iter_destroy(iter);
1351
- rocksdb_writebatch_wi_destroy(wbi);
1352
- }
1353
-
1354
- StartPhase("multiget");
1355
- {
1356
- const char* keys[3] = {"box", "foo", "notfound"};
1357
- const size_t keys_sizes[3] = {3, 3, 8};
1358
- char* vals[3];
1359
- size_t vals_sizes[3];
1360
- char* errs[3];
1361
- const char* expected[3] = {"c", "hello", NULL};
1362
- rocksdb_multi_get(db, roptions, 3, keys, keys_sizes, vals, vals_sizes,
1363
- errs);
1364
- CheckMultiGetValues(3, vals, vals_sizes, errs, expected);
1365
- }
1366
-
1367
- StartPhase("pin_get");
1368
- {
1369
- CheckPinGet(db, roptions, "box", "c");
1370
- CheckPinGet(db, roptions, "foo", "hello");
1371
- CheckPinGet(db, roptions, "notfound", NULL);
1372
- }
1373
-
1374
- StartPhase("approximate_sizes");
1375
- {
1376
- int i;
1377
- int n = 20000;
1378
- char keybuf[100];
1379
- char valbuf[100];
1380
- uint64_t sizes[2];
1381
- const char* start[2] = {"a", "k00000000000000010000"};
1382
- size_t start_len[2] = {1, 21};
1383
- const char* limit[2] = {"k00000000000000010000", "z"};
1384
- size_t limit_len[2] = {21, 1};
1385
- rocksdb_writeoptions_set_sync(woptions, 0);
1386
- for (i = 0; i < n; i++) {
1387
- snprintf(keybuf, sizeof(keybuf), "k%020d", i);
1388
- snprintf(valbuf, sizeof(valbuf), "v%020d", i);
1389
- rocksdb_put(db, woptions, keybuf, strlen(keybuf), valbuf, strlen(valbuf),
1390
- &err);
1391
- CheckNoError(err);
1392
- }
1393
- rocksdb_approximate_sizes(db, 2, start, start_len, limit, limit_len, sizes,
1394
- &err);
1395
- CheckNoError(err);
1396
- CheckCondition(sizes[0] > 0);
1397
- CheckCondition(sizes[1] > 0);
1398
- }
1399
-
1400
- StartPhase("property");
1401
- {
1402
- char* prop = rocksdb_property_value(db, "nosuchprop");
1403
- CheckCondition(prop == NULL);
1404
- prop = rocksdb_property_value(db, "rocksdb.stats");
1405
- CheckCondition(prop != NULL);
1406
- Free(&prop);
1407
- }
1408
-
1409
- StartPhase("snapshot");
1410
- {
1411
- const rocksdb_snapshot_t* snap;
1412
- snap = rocksdb_create_snapshot(db);
1413
- rocksdb_delete(db, woptions, "foo", 3, &err);
1414
- CheckNoError(err);
1415
- rocksdb_readoptions_set_snapshot(roptions, snap);
1416
- CheckGet(db, roptions, "foo", "hello");
1417
- rocksdb_readoptions_set_snapshot(roptions, NULL);
1418
- CheckGet(db, roptions, "foo", NULL);
1419
- rocksdb_release_snapshot(db, snap);
1420
- }
1421
- StartPhase("snapshot_with_memtable_inplace_update");
1422
- {
1423
- rocksdb_close(db);
1424
- const rocksdb_snapshot_t* snap = NULL;
1425
- const char* s_key = "foo_snap";
1426
- const char* value1 = "hello_s1";
1427
- const char* value2 = "hello_s2";
1428
- rocksdb_options_set_allow_concurrent_memtable_write(options, 0);
1429
- rocksdb_options_set_inplace_update_support(options, 1);
1430
- rocksdb_options_set_error_if_exists(options, 0);
1431
- db = rocksdb_open(options, dbname, &err);
1432
- CheckNoError(err);
1433
- rocksdb_put(db, woptions, s_key, 8, value1, 8, &err);
1434
- snap = rocksdb_create_snapshot(db);
1435
- assert(snap != NULL);
1436
- rocksdb_put(db, woptions, s_key, 8, value2, 8, &err);
1437
- CheckNoError(err);
1438
- rocksdb_readoptions_set_snapshot(roptions, snap);
1439
- CheckGet(db, roptions, "foo", NULL);
1440
- // snapshot syntax is invalid, because of inplace update supported is set
1441
- CheckGet(db, roptions, s_key, value2);
1442
- // restore the data and options
1443
- rocksdb_delete(db, woptions, s_key, 8, &err);
1444
- CheckGet(db, roptions, s_key, NULL);
1445
- rocksdb_release_snapshot(db, snap);
1446
- rocksdb_readoptions_set_snapshot(roptions, NULL);
1447
- rocksdb_options_set_inplace_update_support(options, 0);
1448
- rocksdb_options_set_allow_concurrent_memtable_write(options, 1);
1449
- rocksdb_options_set_error_if_exists(options, 1);
1450
- }
1451
- StartPhase("repair");
1452
- {
1453
- // If we do not compact here, then the lazy deletion of
1454
- // files (https://reviews.facebook.net/D6123) would leave
1455
- // around deleted files and the repair process will find
1456
- // those files and put them back into the database.
1457
- rocksdb_compact_range(db, NULL, 0, NULL, 0);
1458
- rocksdb_close(db);
1459
- rocksdb_options_set_create_if_missing(options, 0);
1460
- rocksdb_options_set_error_if_exists(options, 0);
1461
- rocksdb_options_set_wal_recovery_mode(options, 2);
1462
- rocksdb_repair_db(options, dbname, &err);
1463
- CheckNoError(err);
1464
- db = rocksdb_open(options, dbname, &err);
1465
- CheckNoError(err);
1466
- CheckGet(db, roptions, "foo", NULL);
1467
- CheckGet(db, roptions, "bar", NULL);
1468
- CheckGet(db, roptions, "box", "c");
1469
- rocksdb_options_set_create_if_missing(options, 1);
1470
- rocksdb_options_set_error_if_exists(options, 1);
1471
- }
1472
-
1473
- StartPhase("filter");
1474
- for (run = 1; run <= 4; run++) {
1475
- // run=0 uses custom filter (not currently supported)
1476
- // run=1 uses old block-based bloom filter
1477
- // run=2 run uses full bloom filter
1478
- // run=3 uses Ribbon
1479
- // run=4 uses Ribbon-Bloom hybrid configuration
1480
- CheckNoError(err);
1481
- rocksdb_filterpolicy_t* policy;
1482
- if (run == 1) {
1483
- policy = rocksdb_filterpolicy_create_bloom(8.0);
1484
- } else if (run == 2) {
1485
- policy = rocksdb_filterpolicy_create_bloom_full(8.0);
1486
- } else if (run == 3) {
1487
- policy = rocksdb_filterpolicy_create_ribbon(8.0);
1488
- } else {
1489
- policy = rocksdb_filterpolicy_create_ribbon_hybrid(8.0, 1);
1490
- }
1491
- rocksdb_block_based_options_set_filter_policy(table_options, policy);
1492
- rocksdb_block_based_options_set_optimize_filters_for_memory(table_options,
1493
- 0);
1494
-
1495
- // Create new database
1496
- rocksdb_close(db);
1497
- rocksdb_destroy_db(options, dbname, &err);
1498
- rocksdb_options_set_block_based_table_factory(options, table_options);
1499
- db = rocksdb_open(options, dbname, &err);
1500
- CheckNoError(err);
1501
- rocksdb_put(db, woptions, "foo", 3, "foovalue", 8, &err);
1502
- CheckNoError(err);
1503
- rocksdb_put(db, woptions, "bar", 3, "barvalue", 8, &err);
1504
- CheckNoError(err);
1505
-
1506
- {
1507
- // Add enough keys to get just one reasonably populated Bloom filter
1508
- const int keys_to_add = 1500;
1509
- int i;
1510
- char keybuf[100];
1511
- for (i = 0; i < keys_to_add; i++) {
1512
- snprintf(keybuf, sizeof(keybuf), "yes%020d", i);
1513
- rocksdb_put(db, woptions, keybuf, strlen(keybuf), "val", 3, &err);
1514
- CheckNoError(err);
1515
- }
1516
- }
1517
- rocksdb_compact_range(db, NULL, 0, NULL, 0);
1518
-
1519
- CheckGet(db, roptions, "foo", "foovalue");
1520
- CheckGet(db, roptions, "bar", "barvalue");
1521
-
1522
- {
1523
- // Query some keys not added to identify Bloom filter implementation
1524
- // from false positive queries, using perfcontext to detect Bloom
1525
- // filter behavior
1526
- rocksdb_perfcontext_t* perf = rocksdb_perfcontext_create();
1527
- rocksdb_perfcontext_reset(perf);
1528
-
1529
- const int keys_to_query = 10000;
1530
- int i;
1531
- char keybuf[100];
1532
- for (i = 0; i < keys_to_query; i++) {
1533
- snprintf(keybuf, sizeof(keybuf), "no%020d", i);
1534
- CheckGet(db, roptions, keybuf, NULL);
1535
- }
1536
-
1537
- const int hits =
1538
- (int)rocksdb_perfcontext_metric(perf, rocksdb_bloom_sst_hit_count);
1539
- if (run == 0) {
1540
- // Due to half true, half false with fake filter result
1541
- CheckCondition(hits == keys_to_query / 2);
1542
- } else if (run == 1 || run == 2 || run == 4) {
1543
- // For run == 1, block-based Bloom is no longer available in public
1544
- // API; attempting to enable it enables full Bloom instead.
1545
- //
1546
- // Essentially a fingerprint of full Bloom schema, format_version=5
1547
- CheckCondition(hits == 188);
1548
- } else {
1549
- // Essentially a fingerprint of Ribbon schema
1550
- CheckCondition(hits == 226);
1551
- }
1552
- CheckCondition(
1553
- (keys_to_query - hits) ==
1554
- (int)rocksdb_perfcontext_metric(perf, rocksdb_bloom_sst_miss_count));
1555
-
1556
- rocksdb_perfcontext_destroy(perf);
1557
- }
1558
-
1559
- // Reset the policy
1560
- rocksdb_block_based_options_set_filter_policy(table_options, NULL);
1561
- rocksdb_options_set_block_based_table_factory(options, table_options);
1562
- }
1563
-
1564
- StartPhase("compaction_filter");
1565
- {
1566
- rocksdb_options_t* options_with_filter = rocksdb_options_create();
1567
- rocksdb_options_set_create_if_missing(options_with_filter, 1);
1568
- rocksdb_compactionfilter_t* cfilter;
1569
- cfilter = rocksdb_compactionfilter_create(NULL, CFilterDestroy,
1570
- CFilterFilter, CFilterName);
1571
- // Create new database
1572
- rocksdb_close(db);
1573
- rocksdb_destroy_db(options_with_filter, dbname, &err);
1574
- rocksdb_options_set_compaction_filter(options_with_filter, cfilter);
1575
- db = CheckCompaction(db, options_with_filter, roptions, woptions);
1576
-
1577
- rocksdb_options_set_compaction_filter(options_with_filter, NULL);
1578
- rocksdb_compactionfilter_destroy(cfilter);
1579
- rocksdb_options_destroy(options_with_filter);
1580
- }
1581
-
1582
- StartPhase("compaction_filter_factory");
1583
- {
1584
- rocksdb_options_t* options_with_filter_factory = rocksdb_options_create();
1585
- rocksdb_options_set_create_if_missing(options_with_filter_factory, 1);
1586
- rocksdb_compactionfilterfactory_t* factory;
1587
- factory = rocksdb_compactionfilterfactory_create(
1588
- NULL, CFilterFactoryDestroy, CFilterCreate, CFilterFactoryName);
1589
- // Create new database
1590
- rocksdb_close(db);
1591
- rocksdb_destroy_db(options_with_filter_factory, dbname, &err);
1592
- rocksdb_options_set_compaction_filter_factory(options_with_filter_factory,
1593
- factory);
1594
- db = CheckCompaction(db, options_with_filter_factory, roptions, woptions);
1595
-
1596
- rocksdb_options_set_compaction_filter_factory(options_with_filter_factory,
1597
- NULL);
1598
- rocksdb_options_destroy(options_with_filter_factory);
1599
- }
1600
-
1601
- StartPhase("merge_operator");
1602
- {
1603
- rocksdb_mergeoperator_t* merge_operator;
1604
- merge_operator = rocksdb_mergeoperator_create(
1605
- NULL, MergeOperatorDestroy, MergeOperatorFullMerge,
1606
- MergeOperatorPartialMerge, NULL, MergeOperatorName);
1607
- // Create new database
1608
- rocksdb_close(db);
1609
- rocksdb_destroy_db(options, dbname, &err);
1610
- rocksdb_options_set_merge_operator(options, merge_operator);
1611
- db = rocksdb_open(options, dbname, &err);
1612
- CheckNoError(err);
1613
- rocksdb_put(db, woptions, "foo", 3, "foovalue", 8, &err);
1614
- CheckNoError(err);
1615
- CheckGet(db, roptions, "foo", "foovalue");
1616
- rocksdb_merge(db, woptions, "foo", 3, "barvalue", 8, &err);
1617
- CheckNoError(err);
1618
- CheckGet(db, roptions, "foo", "fake");
1619
-
1620
- // Merge of a non-existing value
1621
- rocksdb_merge(db, woptions, "bar", 3, "barvalue", 8, &err);
1622
- CheckNoError(err);
1623
- CheckGet(db, roptions, "bar", "fake");
1624
- }
1625
-
1626
- StartPhase("columnfamilies");
1627
- {
1628
- rocksdb_close(db);
1629
- rocksdb_destroy_db(options, dbname, &err);
1630
- CheckNoError(err);
1631
-
1632
- rocksdb_options_t* db_options = rocksdb_options_create();
1633
- rocksdb_options_set_create_if_missing(db_options, 1);
1634
- db = rocksdb_open(db_options, dbname, &err);
1635
- CheckNoError(err);
1636
- rocksdb_close(db);
1637
- {
1638
- const char* expected_cf_names[1] = {"default"};
1639
- LoadAndCheckLatestOptions(dbname, env, false, cache, NULL, 1,
1640
- expected_cf_names, NULL);
1641
- }
1642
-
1643
- rocksdb_options_set_create_if_missing(db_options, 0);
1644
- db = rocksdb_open(db_options, dbname, &err);
1645
- rocksdb_column_family_handle_t* cfh;
1646
- cfh = rocksdb_create_column_family(db, db_options, "cf1", &err);
1647
- rocksdb_column_family_handle_destroy(cfh);
1648
- CheckNoError(err);
1649
- rocksdb_close(db);
1650
-
1651
- size_t cflen;
1652
- char** column_fams =
1653
- rocksdb_list_column_families(db_options, dbname, &cflen, &err);
1654
- CheckNoError(err);
1655
- CheckEqual("default", column_fams[0], 7);
1656
- CheckEqual("cf1", column_fams[1], 3);
1657
- CheckCondition(cflen == 2);
1658
- rocksdb_list_column_families_destroy(column_fams, cflen);
1659
-
1660
- rocksdb_options_t* cf_options_1 = rocksdb_options_create();
1661
- rocksdb_options_t* cf_options_2 = rocksdb_options_create();
1662
-
1663
- // use dbpathname2 as the cf_path for "cf1"
1664
- rocksdb_dbpath_t* dbpath2;
1665
- char dbpathname2[200];
1666
- snprintf(dbpathname2, sizeof(dbpathname2), "%s/rocksdb_c_test-%d-dbpath2",
1667
- GetTempDir(), ((int)geteuid()));
1668
- dbpath2 = rocksdb_dbpath_create(dbpathname2, 1024 * 1024);
1669
- const rocksdb_dbpath_t* cf_paths[1] = {dbpath2};
1670
- rocksdb_options_set_cf_paths(cf_options_2, cf_paths, 1);
1671
-
1672
- const char* cf_names[2] = {"default", "cf1"};
1673
- const rocksdb_options_t* cf_opts[2] = {cf_options_1, cf_options_2};
1674
- rocksdb_column_family_handle_t* handles[2];
1675
-
1676
- LoadAndCheckLatestOptions(dbname, env, false, cache, NULL, 2, cf_names,
1677
- NULL);
1678
-
1679
- db = rocksdb_open_column_families(db_options, dbname, 2, cf_names, cf_opts,
1680
- handles, &err);
1681
- CheckNoError(err);
1682
-
1683
- rocksdb_put_cf(db, woptions, handles[1], "foo", 3, "hello", 5, &err);
1684
- CheckNoError(err);
1685
-
1686
- rocksdb_put_cf(db, woptions, handles[1], "foobar1", 7, "hello1", 6, &err);
1687
- CheckNoError(err);
1688
- rocksdb_put_cf(db, woptions, handles[1], "foobar2", 7, "hello2", 6, &err);
1689
- CheckNoError(err);
1690
- rocksdb_put_cf(db, woptions, handles[1], "foobar3", 7, "hello3", 6, &err);
1691
- CheckNoError(err);
1692
- rocksdb_put_cf(db, woptions, handles[1], "foobar4", 7, "hello4", 6, &err);
1693
- CheckNoError(err);
1694
- rocksdb_suggest_compact_range_cf(db, handles[1], "foo", 3, "foobar9", 7,
1695
- &err);
1696
- CheckNoError(err);
1697
-
1698
- rocksdb_flushoptions_t* flush_options = rocksdb_flushoptions_create();
1699
- rocksdb_flushoptions_set_wait(flush_options, 1);
1700
- rocksdb_flush_cf(db, flush_options, handles[1], &err);
1701
-
1702
- // make sure all files in "cf1" are under the specified cf path
1703
- {
1704
- rocksdb_column_family_metadata_t* cf_meta =
1705
- rocksdb_get_column_family_metadata_cf(db, handles[1]);
1706
- size_t cf_file_count = rocksdb_column_family_metadata_get_size(cf_meta);
1707
- assert(cf_file_count > 0);
1708
- size_t level_count =
1709
- rocksdb_column_family_metadata_get_level_count(cf_meta);
1710
- assert(level_count > 0);
1711
- for (size_t l = 0; l < level_count; ++l) {
1712
- rocksdb_level_metadata_t* level_meta =
1713
- rocksdb_column_family_metadata_get_level_metadata(cf_meta, l);
1714
- assert(level_meta);
1715
-
1716
- size_t file_count = rocksdb_level_metadata_get_file_count(level_meta);
1717
- for (size_t f = 0; f < file_count; ++f) {
1718
- rocksdb_sst_file_metadata_t* file_meta =
1719
- rocksdb_level_metadata_get_sst_file_metadata(level_meta, f);
1720
- assert(file_meta);
1721
- char* file_path = rocksdb_sst_file_metadata_get_directory(file_meta);
1722
- assert(strcmp(file_path, dbpathname2) == 0);
1723
- Free(&file_path);
1724
- rocksdb_sst_file_metadata_destroy(file_meta);
1725
- }
1726
- rocksdb_level_metadata_destroy(level_meta);
1727
- }
1728
-
1729
- rocksdb_column_family_metadata_destroy(cf_meta);
1730
- }
1731
-
1732
- CheckNoError(err) rocksdb_flushoptions_destroy(flush_options);
1733
-
1734
- CheckGetCF(db, roptions, handles[1], "foo", "hello");
1735
- CheckPinGetCF(db, roptions, handles[1], "foo", "hello");
1736
-
1737
- rocksdb_delete_cf(db, woptions, handles[1], "foo", 3, &err);
1738
- CheckNoError(err);
1739
-
1740
- rocksdb_delete_range_cf(db, woptions, handles[1], "foobar2", 7, "foobar4",
1741
- 7, &err);
1742
- CheckNoError(err);
1743
-
1744
- CheckGetCF(db, roptions, handles[1], "foo", NULL);
1745
- CheckPinGetCF(db, roptions, handles[1], "foo", NULL);
1746
-
1747
- rocksdb_writebatch_t* wb = rocksdb_writebatch_create();
1748
- rocksdb_writebatch_put_cf(wb, handles[1], "baz", 3, "a", 1);
1749
- rocksdb_writebatch_clear(wb);
1750
- rocksdb_writebatch_put_cf(wb, handles[1], "bar", 3, "b", 1);
1751
- rocksdb_writebatch_put_cf(wb, handles[1], "box", 3, "c", 1);
1752
- rocksdb_writebatch_put_cf(wb, handles[1], "buff", 4, "rocksdb", 7);
1753
- rocksdb_writebatch_delete_cf(wb, handles[1], "bar", 3);
1754
- rocksdb_write(db, woptions, wb, &err);
1755
- CheckNoError(err);
1756
- CheckGetCF(db, roptions, handles[1], "baz", NULL);
1757
- CheckGetCF(db, roptions, handles[1], "bar", NULL);
1758
- CheckGetCF(db, roptions, handles[1], "box", "c");
1759
- CheckGetCF(db, roptions, handles[1], "buff", "rocksdb");
1760
- CheckPinGetCF(db, roptions, handles[1], "baz", NULL);
1761
- CheckPinGetCF(db, roptions, handles[1], "bar", NULL);
1762
- CheckPinGetCF(db, roptions, handles[1], "box", "c");
1763
- CheckPinGetCF(db, roptions, handles[1], "buff", "rocksdb");
1764
- rocksdb_writebatch_clear(wb);
1765
- // Test WriteBatch iteration with Column Family
1766
- int pos = 0;
1767
- rocksdb_writebatch_put_cf(wb, handles[1], "bar", 3, "b", 1);
1768
- rocksdb_writebatch_put_cf(wb, handles[1], "box", 3, "c", 1);
1769
- rocksdb_writebatch_delete_cf(wb, handles[1], "bar", 3);
1770
- rocksdb_writebatch_merge_cf(wb, handles[1], "box", 3, "cc", 2);
1771
- rocksdb_writebatch_put(wb, "foo", 3, "f", 1);
1772
- rocksdb_writebatch_delete(wb, "foo", 3);
1773
- rocksdb_writebatch_put(wb, "baz", 3, "a", 1);
1774
- rocksdb_writebatch_merge(wb, "baz", 3, "aa", 2);
1775
- rocksdb_writebatch_iterate_cf(wb, &pos, CheckPutCF, CheckDelCF,
1776
- CheckMergeCF);
1777
- CheckCondition(pos == 8);
1778
- rocksdb_writebatch_clear(wb);
1779
- rocksdb_writebatch_destroy(wb);
1780
-
1781
- rocksdb_flush_wal(db, 1, &err);
1782
- CheckNoError(err);
1783
-
1784
- const char* keys[3] = {"box", "box", "barfooxx"};
1785
- const rocksdb_column_family_handle_t* get_handles[3] = {
1786
- handles[0], handles[1], handles[1]};
1787
- const size_t keys_sizes[3] = {3, 3, 8};
1788
- char* vals[3];
1789
- size_t vals_sizes[3];
1790
- char* errs[3];
1791
- rocksdb_multi_get_cf(db, roptions, get_handles, 3, keys, keys_sizes, vals,
1792
- vals_sizes, errs);
1793
-
1794
- int i;
1795
- for (i = 0; i < 3; i++) {
1796
- CheckEqual(NULL, errs[i], 0);
1797
- switch (i) {
1798
- case 0:
1799
- CheckEqual(NULL, vals[i], vals_sizes[i]); // wrong cf
1800
- break;
1801
- case 1:
1802
- CheckEqual("c", vals[i], vals_sizes[i]); // bingo
1803
- break;
1804
- case 2:
1805
- CheckEqual(NULL, vals[i], vals_sizes[i]); // normal not found
1806
- break;
1807
- }
1808
- Free(&vals[i]);
1809
- }
1810
-
1811
- {
1812
- const char* batched_keys[4] = {"box", "buff", "barfooxx", "box"};
1813
- const size_t batched_keys_sizes[4] = {3, 4, 8, 3};
1814
- const char* expected_value[4] = {"c", "rocksdb", NULL, "c"};
1815
- char* batched_errs[4];
1816
-
1817
- rocksdb_pinnableslice_t* pvals[4];
1818
- rocksdb_batched_multi_get_cf(db, roptions, handles[1], 4, batched_keys,
1819
- batched_keys_sizes, pvals, batched_errs,
1820
- false);
1821
- const char* val;
1822
- size_t val_len;
1823
- for (i = 0; i < 4; ++i) {
1824
- val = rocksdb_pinnableslice_value(pvals[i], &val_len);
1825
- CheckNoError(batched_errs[i]);
1826
- CheckEqual(expected_value[i], val, val_len);
1827
- rocksdb_pinnableslice_destroy(pvals[i]);
1828
- }
1829
- }
1830
-
1831
- {
1832
- unsigned char value_found = 0;
1833
-
1834
- CheckCondition(!rocksdb_key_may_exist(db, roptions, "invalid_key", 11,
1835
- NULL, NULL, NULL, 0, NULL));
1836
- CheckCondition(!rocksdb_key_may_exist(db, roptions, "invalid_key", 11,
1837
- &vals[0], &vals_sizes[0], NULL, 0,
1838
- &value_found));
1839
- if (value_found) {
1840
- Free(&vals[0]);
1841
- }
1842
-
1843
- CheckCondition(!rocksdb_key_may_exist_cf(db, roptions, handles[1],
1844
- "invalid_key", 11, NULL, NULL,
1845
- NULL, 0, NULL));
1846
- CheckCondition(!rocksdb_key_may_exist_cf(db, roptions, handles[1],
1847
- "invalid_key", 11, &vals[0],
1848
- &vals_sizes[0], NULL, 0, NULL));
1849
- if (value_found) {
1850
- Free(&vals[0]);
1851
- }
1852
- }
1853
-
1854
- rocksdb_iterator_t* iter =
1855
- rocksdb_create_iterator_cf(db, roptions, handles[1]);
1856
- CheckCondition(!rocksdb_iter_valid(iter));
1857
- rocksdb_iter_seek_to_first(iter);
1858
- CheckCondition(rocksdb_iter_valid(iter));
1859
-
1860
- for (i = 0; rocksdb_iter_valid(iter) != 0; rocksdb_iter_next(iter)) {
1861
- i++;
1862
- }
1863
- CheckCondition(i == 4);
1864
- rocksdb_iter_get_error(iter, &err);
1865
- CheckNoError(err);
1866
- rocksdb_iter_destroy(iter);
1867
-
1868
- rocksdb_column_family_handle_t* iters_cf_handles[2] = {handles[0],
1869
- handles[1]};
1870
- rocksdb_iterator_t* iters_handles[2];
1871
- rocksdb_create_iterators(db, roptions, iters_cf_handles, iters_handles, 2,
1872
- &err);
1873
- CheckNoError(err);
1874
-
1875
- iter = iters_handles[0];
1876
- CheckCondition(!rocksdb_iter_valid(iter));
1877
- rocksdb_iter_seek_to_first(iter);
1878
- CheckCondition(!rocksdb_iter_valid(iter));
1879
- rocksdb_iter_destroy(iter);
1880
-
1881
- iter = iters_handles[1];
1882
- CheckCondition(!rocksdb_iter_valid(iter));
1883
- rocksdb_iter_seek_to_first(iter);
1884
- CheckCondition(rocksdb_iter_valid(iter));
1885
-
1886
- for (i = 0; rocksdb_iter_valid(iter) != 0; rocksdb_iter_next(iter)) {
1887
- i++;
1888
- }
1889
- CheckCondition(i == 4);
1890
- rocksdb_iter_get_error(iter, &err);
1891
- CheckNoError(err);
1892
- rocksdb_iter_destroy(iter);
1893
-
1894
- GetAndCheckMetaDataCf(db, handles[1], cf_names[1]);
1895
-
1896
- rocksdb_drop_column_family(db, handles[1], &err);
1897
- CheckNoError(err);
1898
- for (i = 0; i < 2; i++) {
1899
- rocksdb_column_family_handle_destroy(handles[i]);
1900
- }
1901
- rocksdb_close(db);
1902
- {
1903
- // As column family has been dropped, we expect only one column family.
1904
- const char* expected_cf_names[1] = {"default"};
1905
- LoadAndCheckLatestOptions(dbname, env, false, cache, NULL, 1,
1906
- expected_cf_names, NULL);
1907
- }
1908
- rocksdb_destroy_db(options, dbname, &err);
1909
- rocksdb_options_destroy(db_options);
1910
- rocksdb_options_destroy(cf_options_1);
1911
- rocksdb_options_destroy(cf_options_2);
1912
- rocksdb_dbpath_destroy(dbpath2);
1913
- }
1914
-
1915
- StartPhase("prefix");
1916
- {
1917
- // Create new database
1918
- rocksdb_options_set_allow_mmap_reads(options, 1);
1919
- rocksdb_options_set_prefix_extractor(
1920
- options, rocksdb_slicetransform_create_fixed_prefix(3));
1921
- rocksdb_options_set_hash_skip_list_rep(options, 5000, 4, 4);
1922
- rocksdb_options_set_plain_table_factory(options, 4, 10, 0.75, 16, 0, 0, 0,
1923
- 0);
1924
- rocksdb_options_set_allow_concurrent_memtable_write(options, 0);
1925
-
1926
- db = rocksdb_open(options, dbname, &err);
1927
- CheckNoError(err);
1928
-
1929
- rocksdb_put(db, woptions, "foo1", 4, "foo", 3, &err);
1930
- CheckNoError(err);
1931
- rocksdb_put(db, woptions, "foo2", 4, "foo", 3, &err);
1932
- CheckNoError(err);
1933
- rocksdb_put(db, woptions, "foo3", 4, "foo", 3, &err);
1934
- CheckNoError(err);
1935
- rocksdb_put(db, woptions, "bar1", 4, "bar", 3, &err);
1936
- CheckNoError(err);
1937
- rocksdb_put(db, woptions, "bar2", 4, "bar", 3, &err);
1938
- CheckNoError(err);
1939
- rocksdb_put(db, woptions, "bar3", 4, "bar", 3, &err);
1940
- CheckNoError(err);
1941
-
1942
- rocksdb_iterator_t* iter = rocksdb_create_iterator(db, roptions);
1943
- CheckCondition(!rocksdb_iter_valid(iter));
1944
-
1945
- rocksdb_iter_seek(iter, "bar", 3);
1946
- rocksdb_iter_get_error(iter, &err);
1947
- CheckNoError(err);
1948
- CheckCondition(rocksdb_iter_valid(iter));
1949
-
1950
- CheckIter(iter, "bar1", "bar");
1951
- rocksdb_iter_next(iter);
1952
- CheckIter(iter, "bar2", "bar");
1953
- rocksdb_iter_next(iter);
1954
- CheckIter(iter, "bar3", "bar");
1955
- rocksdb_iter_get_error(iter, &err);
1956
- CheckNoError(err);
1957
- rocksdb_iter_destroy(iter);
1958
-
1959
- rocksdb_readoptions_set_total_order_seek(roptions, 1);
1960
- iter = rocksdb_create_iterator(db, roptions);
1961
- CheckCondition(!rocksdb_iter_valid(iter));
1962
-
1963
- rocksdb_iter_seek(iter, "ba", 2);
1964
- rocksdb_iter_get_error(iter, &err);
1965
- CheckNoError(err);
1966
- CheckCondition(rocksdb_iter_valid(iter));
1967
- CheckIter(iter, "bar1", "bar");
1968
-
1969
- rocksdb_iter_destroy(iter);
1970
- rocksdb_readoptions_set_total_order_seek(roptions, 0);
1971
-
1972
- rocksdb_close(db);
1973
-
1974
- {
1975
- const char* expected_cf_names[1] = {"default"};
1976
- LoadAndCheckLatestOptions(dbname, env, false, cache, NULL, 1,
1977
- expected_cf_names,
1978
- "Invalid argument: leveldb.BytewiseComparator: "
1979
- "does not match existing comparator foo");
1980
- LoadAndCheckLatestOptions(dbname, env, false, cache, cmp, 1,
1981
- expected_cf_names, NULL);
1982
- }
1983
- rocksdb_destroy_db(options, dbname, &err);
1984
- }
1985
-
1986
- // Check memory usage stats
1987
- StartPhase("approximate_memory_usage");
1988
- {
1989
- // Create database
1990
- db = rocksdb_open(options, dbname, &err);
1991
- CheckNoError(err);
1992
-
1993
- rocksdb_memory_consumers_t* consumers;
1994
- consumers = rocksdb_memory_consumers_create();
1995
- rocksdb_memory_consumers_add_db(consumers, db);
1996
- rocksdb_memory_consumers_add_cache(consumers, cache);
1997
-
1998
- // take memory usage report before write-read operation
1999
- rocksdb_memory_usage_t* mu1;
2000
- mu1 = rocksdb_approximate_memory_usage_create(consumers, &err);
2001
- CheckNoError(err);
2002
-
2003
- // Put data (this should affect memtables)
2004
- rocksdb_put(db, woptions, "memory", 6, "test", 4, &err);
2005
- CheckNoError(err);
2006
- CheckGet(db, roptions, "memory", "test");
2007
-
2008
- // take memory usage report after write-read operation
2009
- rocksdb_memory_usage_t* mu2;
2010
- mu2 = rocksdb_approximate_memory_usage_create(consumers, &err);
2011
- CheckNoError(err);
2012
-
2013
- // amount of memory used within memtables should grow
2014
- CheckCondition(rocksdb_approximate_memory_usage_get_mem_table_total(mu2) >=
2015
- rocksdb_approximate_memory_usage_get_mem_table_total(mu1));
2016
- CheckCondition(
2017
- rocksdb_approximate_memory_usage_get_mem_table_unflushed(mu2) >=
2018
- rocksdb_approximate_memory_usage_get_mem_table_unflushed(mu1));
2019
-
2020
- rocksdb_memory_consumers_destroy(consumers);
2021
- rocksdb_approximate_memory_usage_destroy(mu1);
2022
- rocksdb_approximate_memory_usage_destroy(mu2);
2023
- rocksdb_close(db);
2024
- rocksdb_destroy_db(options, dbname, &err);
2025
- CheckNoError(err);
2026
- }
2027
-
2028
- StartPhase("cuckoo_options");
2029
- {
2030
- rocksdb_cuckoo_table_options_t* cuckoo_options;
2031
- cuckoo_options = rocksdb_cuckoo_options_create();
2032
- rocksdb_cuckoo_options_set_hash_ratio(cuckoo_options, 0.5);
2033
- rocksdb_cuckoo_options_set_max_search_depth(cuckoo_options, 200);
2034
- rocksdb_cuckoo_options_set_cuckoo_block_size(cuckoo_options, 10);
2035
- rocksdb_cuckoo_options_set_identity_as_first_hash(cuckoo_options, 1);
2036
- rocksdb_cuckoo_options_set_use_module_hash(cuckoo_options, 0);
2037
- rocksdb_options_set_cuckoo_table_factory(options, cuckoo_options);
2038
-
2039
- db = rocksdb_open(options, dbname, &err);
2040
- CheckNoError(err);
2041
-
2042
- rocksdb_cuckoo_options_destroy(cuckoo_options);
2043
- }
2044
-
2045
- StartPhase("options");
2046
- {
2047
- rocksdb_options_t* o;
2048
- o = rocksdb_options_create();
2049
-
2050
- // Set and check options.
2051
- rocksdb_options_set_allow_ingest_behind(o, 1);
2052
- CheckCondition(1 == rocksdb_options_get_allow_ingest_behind(o));
2053
-
2054
- rocksdb_options_compaction_readahead_size(o, 10);
2055
- CheckCondition(10 == rocksdb_options_get_compaction_readahead_size(o));
2056
-
2057
- rocksdb_options_set_create_if_missing(o, 1);
2058
- CheckCondition(1 == rocksdb_options_get_create_if_missing(o));
2059
-
2060
- rocksdb_options_set_create_missing_column_families(o, 1);
2061
- CheckCondition(1 == rocksdb_options_get_create_missing_column_families(o));
2062
-
2063
- rocksdb_options_set_error_if_exists(o, 1);
2064
- CheckCondition(1 == rocksdb_options_get_error_if_exists(o));
2065
-
2066
- rocksdb_options_set_paranoid_checks(o, 1);
2067
- CheckCondition(1 == rocksdb_options_get_paranoid_checks(o));
2068
-
2069
- rocksdb_options_set_info_log_level(o, 3);
2070
- CheckCondition(3 == rocksdb_options_get_info_log_level(o));
2071
-
2072
- rocksdb_options_set_write_buffer_size(o, 100);
2073
- CheckCondition(100 == rocksdb_options_get_write_buffer_size(o));
2074
-
2075
- rocksdb_options_set_db_write_buffer_size(o, 1000);
2076
- CheckCondition(1000 == rocksdb_options_get_db_write_buffer_size(o));
2077
-
2078
- rocksdb_options_set_max_open_files(o, 21);
2079
- CheckCondition(21 == rocksdb_options_get_max_open_files(o));
2080
-
2081
- rocksdb_options_set_max_file_opening_threads(o, 5);
2082
- CheckCondition(5 == rocksdb_options_get_max_file_opening_threads(o));
2083
-
2084
- rocksdb_options_set_max_total_wal_size(o, 400);
2085
- CheckCondition(400 == rocksdb_options_get_max_total_wal_size(o));
2086
-
2087
- rocksdb_options_set_num_levels(o, 7);
2088
- CheckCondition(7 == rocksdb_options_get_num_levels(o));
2089
-
2090
- rocksdb_options_set_level0_file_num_compaction_trigger(o, 4);
2091
- CheckCondition(4 ==
2092
- rocksdb_options_get_level0_file_num_compaction_trigger(o));
2093
-
2094
- rocksdb_options_set_level0_slowdown_writes_trigger(o, 6);
2095
- CheckCondition(6 == rocksdb_options_get_level0_slowdown_writes_trigger(o));
2096
-
2097
- rocksdb_options_set_level0_stop_writes_trigger(o, 8);
2098
- CheckCondition(8 == rocksdb_options_get_level0_stop_writes_trigger(o));
2099
-
2100
- rocksdb_options_set_target_file_size_base(o, 256);
2101
- CheckCondition(256 == rocksdb_options_get_target_file_size_base(o));
2102
-
2103
- rocksdb_options_set_target_file_size_multiplier(o, 3);
2104
- CheckCondition(3 == rocksdb_options_get_target_file_size_multiplier(o));
2105
-
2106
- rocksdb_options_set_max_bytes_for_level_base(o, 1024);
2107
- CheckCondition(1024 == rocksdb_options_get_max_bytes_for_level_base(o));
2108
-
2109
- rocksdb_options_set_level_compaction_dynamic_level_bytes(o, 1);
2110
- CheckCondition(1 ==
2111
- rocksdb_options_get_level_compaction_dynamic_level_bytes(o));
2112
-
2113
- rocksdb_options_set_max_bytes_for_level_multiplier(o, 2.0);
2114
- CheckCondition(2.0 ==
2115
- rocksdb_options_get_max_bytes_for_level_multiplier(o));
2116
-
2117
- rocksdb_options_set_periodic_compaction_seconds(o, 100000);
2118
- CheckCondition(100000 ==
2119
- rocksdb_options_get_periodic_compaction_seconds(o));
2120
-
2121
- rocksdb_options_set_ttl(o, 5000);
2122
- CheckCondition(5000 == rocksdb_options_get_ttl(o));
2123
-
2124
- rocksdb_options_set_skip_stats_update_on_db_open(o, 1);
2125
- CheckCondition(1 == rocksdb_options_get_skip_stats_update_on_db_open(o));
2126
-
2127
- rocksdb_options_set_skip_checking_sst_file_sizes_on_db_open(o, 1);
2128
- CheckCondition(
2129
- 1 == rocksdb_options_get_skip_checking_sst_file_sizes_on_db_open(o));
2130
-
2131
- rocksdb_options_set_max_write_buffer_number(o, 97);
2132
- CheckCondition(97 == rocksdb_options_get_max_write_buffer_number(o));
2133
-
2134
- rocksdb_options_set_min_write_buffer_number_to_merge(o, 23);
2135
- CheckCondition(23 ==
2136
- rocksdb_options_get_min_write_buffer_number_to_merge(o));
2137
-
2138
- rocksdb_options_set_max_write_buffer_number_to_maintain(o, 64);
2139
- CheckCondition(64 ==
2140
- rocksdb_options_get_max_write_buffer_number_to_maintain(o));
2141
-
2142
- rocksdb_options_set_max_write_buffer_size_to_maintain(o, 50000);
2143
- CheckCondition(50000 ==
2144
- rocksdb_options_get_max_write_buffer_size_to_maintain(o));
2145
-
2146
- rocksdb_options_set_enable_pipelined_write(o, 1);
2147
- CheckCondition(1 == rocksdb_options_get_enable_pipelined_write(o));
2148
-
2149
- rocksdb_options_set_unordered_write(o, 1);
2150
- CheckCondition(1 == rocksdb_options_get_unordered_write(o));
2151
-
2152
- rocksdb_options_set_max_subcompactions(o, 123456);
2153
- CheckCondition(123456 == rocksdb_options_get_max_subcompactions(o));
2154
-
2155
- rocksdb_options_set_max_background_jobs(o, 2);
2156
- CheckCondition(2 == rocksdb_options_get_max_background_jobs(o));
2157
-
2158
- rocksdb_options_set_max_background_compactions(o, 3);
2159
- CheckCondition(3 == rocksdb_options_get_max_background_compactions(o));
2160
-
2161
- rocksdb_options_set_max_background_flushes(o, 5);
2162
- CheckCondition(5 == rocksdb_options_get_max_background_flushes(o));
2163
-
2164
- rocksdb_options_set_max_log_file_size(o, 6);
2165
- CheckCondition(6 == rocksdb_options_get_max_log_file_size(o));
2166
-
2167
- rocksdb_options_set_log_file_time_to_roll(o, 7);
2168
- CheckCondition(7 == rocksdb_options_get_log_file_time_to_roll(o));
2169
-
2170
- rocksdb_options_set_keep_log_file_num(o, 8);
2171
- CheckCondition(8 == rocksdb_options_get_keep_log_file_num(o));
2172
-
2173
- rocksdb_options_set_recycle_log_file_num(o, 9);
2174
- CheckCondition(9 == rocksdb_options_get_recycle_log_file_num(o));
2175
-
2176
- rocksdb_options_set_soft_pending_compaction_bytes_limit(o, 10);
2177
- CheckCondition(10 ==
2178
- rocksdb_options_get_soft_pending_compaction_bytes_limit(o));
2179
-
2180
- rocksdb_options_set_hard_pending_compaction_bytes_limit(o, 11);
2181
- CheckCondition(11 ==
2182
- rocksdb_options_get_hard_pending_compaction_bytes_limit(o));
2183
-
2184
- rocksdb_options_set_max_manifest_file_size(o, 12);
2185
- CheckCondition(12 == rocksdb_options_get_max_manifest_file_size(o));
2186
-
2187
- rocksdb_options_set_table_cache_numshardbits(o, 13);
2188
- CheckCondition(13 == rocksdb_options_get_table_cache_numshardbits(o));
2189
-
2190
- rocksdb_options_set_arena_block_size(o, 14);
2191
- CheckCondition(14 == rocksdb_options_get_arena_block_size(o));
2192
-
2193
- rocksdb_options_set_use_fsync(o, 1);
2194
- CheckCondition(1 == rocksdb_options_get_use_fsync(o));
2195
-
2196
- rocksdb_options_set_WAL_ttl_seconds(o, 15);
2197
- CheckCondition(15 == rocksdb_options_get_WAL_ttl_seconds(o));
2198
-
2199
- rocksdb_options_set_WAL_size_limit_MB(o, 16);
2200
- CheckCondition(16 == rocksdb_options_get_WAL_size_limit_MB(o));
2201
-
2202
- rocksdb_options_set_manifest_preallocation_size(o, 17);
2203
- CheckCondition(17 == rocksdb_options_get_manifest_preallocation_size(o));
2204
-
2205
- rocksdb_options_set_allow_mmap_reads(o, 1);
2206
- CheckCondition(1 == rocksdb_options_get_allow_mmap_reads(o));
2207
-
2208
- rocksdb_options_set_allow_mmap_writes(o, 1);
2209
- CheckCondition(1 == rocksdb_options_get_allow_mmap_writes(o));
2210
-
2211
- rocksdb_options_set_use_direct_reads(o, 1);
2212
- CheckCondition(1 == rocksdb_options_get_use_direct_reads(o));
2213
-
2214
- rocksdb_options_set_use_direct_io_for_flush_and_compaction(o, 1);
2215
- CheckCondition(
2216
- 1 == rocksdb_options_get_use_direct_io_for_flush_and_compaction(o));
2217
-
2218
- rocksdb_options_set_is_fd_close_on_exec(o, 1);
2219
- CheckCondition(1 == rocksdb_options_get_is_fd_close_on_exec(o));
2220
-
2221
- rocksdb_options_set_stats_dump_period_sec(o, 18);
2222
- CheckCondition(18 == rocksdb_options_get_stats_dump_period_sec(o));
2223
-
2224
- rocksdb_options_set_stats_persist_period_sec(o, 5);
2225
- CheckCondition(5 == rocksdb_options_get_stats_persist_period_sec(o));
2226
-
2227
- rocksdb_options_set_advise_random_on_open(o, 1);
2228
- CheckCondition(1 == rocksdb_options_get_advise_random_on_open(o));
2229
-
2230
- rocksdb_options_set_use_adaptive_mutex(o, 1);
2231
- CheckCondition(1 == rocksdb_options_get_use_adaptive_mutex(o));
2232
-
2233
- rocksdb_options_set_bytes_per_sync(o, 19);
2234
- CheckCondition(19 == rocksdb_options_get_bytes_per_sync(o));
2235
-
2236
- rocksdb_options_set_wal_bytes_per_sync(o, 20);
2237
- CheckCondition(20 == rocksdb_options_get_wal_bytes_per_sync(o));
2238
-
2239
- rocksdb_options_set_writable_file_max_buffer_size(o, 21);
2240
- CheckCondition(21 == rocksdb_options_get_writable_file_max_buffer_size(o));
2241
-
2242
- rocksdb_options_set_allow_concurrent_memtable_write(o, 1);
2243
- CheckCondition(1 == rocksdb_options_get_allow_concurrent_memtable_write(o));
2244
-
2245
- rocksdb_options_set_enable_write_thread_adaptive_yield(o, 1);
2246
- CheckCondition(1 ==
2247
- rocksdb_options_get_enable_write_thread_adaptive_yield(o));
2248
-
2249
- rocksdb_options_set_max_sequential_skip_in_iterations(o, 22);
2250
- CheckCondition(22 ==
2251
- rocksdb_options_get_max_sequential_skip_in_iterations(o));
2252
-
2253
- rocksdb_options_set_disable_auto_compactions(o, 1);
2254
- CheckCondition(1 == rocksdb_options_get_disable_auto_compactions(o));
2255
-
2256
- rocksdb_options_set_optimize_filters_for_hits(o, 1);
2257
- CheckCondition(1 == rocksdb_options_get_optimize_filters_for_hits(o));
2258
-
2259
- rocksdb_options_set_delete_obsolete_files_period_micros(o, 23);
2260
- CheckCondition(23 ==
2261
- rocksdb_options_get_delete_obsolete_files_period_micros(o));
2262
-
2263
- rocksdb_options_set_memtable_prefix_bloom_size_ratio(o, 2.0);
2264
- CheckCondition(2.0 ==
2265
- rocksdb_options_get_memtable_prefix_bloom_size_ratio(o));
2266
-
2267
- rocksdb_options_set_max_compaction_bytes(o, 24);
2268
- CheckCondition(24 == rocksdb_options_get_max_compaction_bytes(o));
2269
-
2270
- rocksdb_options_set_memtable_huge_page_size(o, 25);
2271
- CheckCondition(25 == rocksdb_options_get_memtable_huge_page_size(o));
2272
-
2273
- rocksdb_options_set_max_successive_merges(o, 26);
2274
- CheckCondition(26 == rocksdb_options_get_max_successive_merges(o));
2275
-
2276
- rocksdb_options_set_bloom_locality(o, 27);
2277
- CheckCondition(27 == rocksdb_options_get_bloom_locality(o));
2278
-
2279
- rocksdb_options_set_inplace_update_support(o, 1);
2280
- CheckCondition(1 == rocksdb_options_get_inplace_update_support(o));
2281
-
2282
- rocksdb_options_set_inplace_update_num_locks(o, 28);
2283
- CheckCondition(28 == rocksdb_options_get_inplace_update_num_locks(o));
2284
-
2285
- rocksdb_options_set_report_bg_io_stats(o, 1);
2286
- CheckCondition(1 == rocksdb_options_get_report_bg_io_stats(o));
2287
-
2288
- rocksdb_options_set_wal_recovery_mode(o, 2);
2289
- CheckCondition(2 == rocksdb_options_get_wal_recovery_mode(o));
2290
-
2291
- rocksdb_options_set_compression(o, 5);
2292
- CheckCondition(5 == rocksdb_options_get_compression(o));
2293
-
2294
- rocksdb_options_set_bottommost_compression(o, 4);
2295
- CheckCondition(4 == rocksdb_options_get_bottommost_compression(o));
2296
-
2297
- rocksdb_options_set_compaction_style(o, 2);
2298
- CheckCondition(2 == rocksdb_options_get_compaction_style(o));
2299
-
2300
- rocksdb_options_set_compaction_pri(o, 4);
2301
- CheckCondition(4 == rocksdb_options_get_compaction_pri(o));
2302
-
2303
- rocksdb_options_set_atomic_flush(o, 1);
2304
- CheckCondition(1 == rocksdb_options_get_atomic_flush(o));
2305
-
2306
- rocksdb_options_set_manual_wal_flush(o, 1);
2307
- CheckCondition(1 == rocksdb_options_get_manual_wal_flush(o));
2308
-
2309
- rocksdb_options_set_wal_compression(o, 1);
2310
- CheckCondition(1 == rocksdb_options_get_wal_compression(o));
2311
-
2312
- rocksdb_options_set_experimental_mempurge_threshold(o, 29.0);
2313
- CheckCondition(29.0 ==
2314
- rocksdb_options_get_experimental_mempurge_threshold(o));
2315
-
2316
- CheckCondition(rocksdb_statistics_level_disable_all ==
2317
- rocksdb_options_get_statistics_level(o));
2318
- rocksdb_options_enable_statistics(o);
2319
- CheckCondition(rocksdb_statistics_level_disable_all !=
2320
- rocksdb_options_get_statistics_level(o));
2321
- rocksdb_options_set_statistics_level(o, rocksdb_statistics_level_all);
2322
- CheckCondition(rocksdb_statistics_level_all ==
2323
- rocksdb_options_get_statistics_level(o));
2324
-
2325
- CheckCondition(0 ==
2326
- rocksdb_options_get_track_and_verify_wals_in_manifest(o));
2327
- rocksdb_options_set_track_and_verify_wals_in_manifest(o, 42);
2328
- CheckCondition(1 ==
2329
- rocksdb_options_get_track_and_verify_wals_in_manifest(o));
2330
-
2331
- /* Blob Options */
2332
- rocksdb_options_set_enable_blob_files(o, 1);
2333
- CheckCondition(1 == rocksdb_options_get_enable_blob_files(o));
2334
-
2335
- rocksdb_options_set_min_blob_size(o, 29);
2336
- CheckCondition(29 == rocksdb_options_get_min_blob_size(o));
2337
-
2338
- rocksdb_options_set_blob_file_size(o, 30);
2339
- CheckCondition(30 == rocksdb_options_get_blob_file_size(o));
2340
-
2341
- rocksdb_options_set_blob_compression_type(o, 4);
2342
- CheckCondition(4 == rocksdb_options_get_blob_compression_type(o));
2343
-
2344
- rocksdb_options_set_enable_blob_gc(o, 1);
2345
- CheckCondition(1 == rocksdb_options_get_enable_blob_gc(o));
2346
-
2347
- rocksdb_options_set_blob_gc_age_cutoff(o, 0.5);
2348
- CheckCondition(0.5 == rocksdb_options_get_blob_gc_age_cutoff(o));
2349
-
2350
- rocksdb_options_set_blob_gc_force_threshold(o, 0.75);
2351
- CheckCondition(0.75 == rocksdb_options_get_blob_gc_force_threshold(o));
2352
-
2353
- rocksdb_options_set_blob_compaction_readahead_size(o, 262144);
2354
- CheckCondition(262144 ==
2355
- rocksdb_options_get_blob_compaction_readahead_size(o));
2356
-
2357
- rocksdb_options_set_blob_file_starting_level(o, 5);
2358
- CheckCondition(5 == rocksdb_options_get_blob_file_starting_level(o));
2359
-
2360
- rocksdb_options_set_prepopulate_blob_cache(o, 1 /* flush only */);
2361
- CheckCondition(1 == rocksdb_options_get_prepopulate_blob_cache(o));
2362
-
2363
- // Create a copy that should be equal to the original.
2364
- rocksdb_options_t* copy;
2365
- copy = rocksdb_options_create_copy(o);
2366
-
2367
- CheckCondition(1 == rocksdb_options_get_allow_ingest_behind(copy));
2368
- CheckCondition(10 == rocksdb_options_get_compaction_readahead_size(copy));
2369
- CheckCondition(1 == rocksdb_options_get_create_if_missing(copy));
2370
- CheckCondition(1 ==
2371
- rocksdb_options_get_create_missing_column_families(copy));
2372
- CheckCondition(1 == rocksdb_options_get_error_if_exists(copy));
2373
- CheckCondition(1 == rocksdb_options_get_paranoid_checks(copy));
2374
- CheckCondition(3 == rocksdb_options_get_info_log_level(copy));
2375
- CheckCondition(100 == rocksdb_options_get_write_buffer_size(copy));
2376
- CheckCondition(1000 == rocksdb_options_get_db_write_buffer_size(copy));
2377
- CheckCondition(21 == rocksdb_options_get_max_open_files(copy));
2378
- CheckCondition(5 == rocksdb_options_get_max_file_opening_threads(copy));
2379
- CheckCondition(400 == rocksdb_options_get_max_total_wal_size(copy));
2380
- CheckCondition(7 == rocksdb_options_get_num_levels(copy));
2381
- CheckCondition(
2382
- 4 == rocksdb_options_get_level0_file_num_compaction_trigger(copy));
2383
- CheckCondition(6 ==
2384
- rocksdb_options_get_level0_slowdown_writes_trigger(copy));
2385
- CheckCondition(8 == rocksdb_options_get_level0_stop_writes_trigger(copy));
2386
- CheckCondition(256 == rocksdb_options_get_target_file_size_base(copy));
2387
- CheckCondition(3 == rocksdb_options_get_target_file_size_multiplier(copy));
2388
- CheckCondition(1024 == rocksdb_options_get_max_bytes_for_level_base(copy));
2389
- CheckCondition(
2390
- 1 == rocksdb_options_get_level_compaction_dynamic_level_bytes(copy));
2391
- CheckCondition(2.0 ==
2392
- rocksdb_options_get_max_bytes_for_level_multiplier(copy));
2393
- CheckCondition(1 == rocksdb_options_get_skip_stats_update_on_db_open(copy));
2394
- CheckCondition(
2395
- 1 == rocksdb_options_get_skip_checking_sst_file_sizes_on_db_open(copy));
2396
- CheckCondition(97 == rocksdb_options_get_max_write_buffer_number(copy));
2397
- CheckCondition(23 ==
2398
- rocksdb_options_get_min_write_buffer_number_to_merge(copy));
2399
- CheckCondition(
2400
- 64 == rocksdb_options_get_max_write_buffer_number_to_maintain(copy));
2401
- CheckCondition(50000 ==
2402
- rocksdb_options_get_max_write_buffer_size_to_maintain(copy));
2403
- CheckCondition(1 == rocksdb_options_get_enable_pipelined_write(copy));
2404
- CheckCondition(1 == rocksdb_options_get_unordered_write(copy));
2405
- CheckCondition(123456 == rocksdb_options_get_max_subcompactions(copy));
2406
- CheckCondition(2 == rocksdb_options_get_max_background_jobs(copy));
2407
- CheckCondition(3 == rocksdb_options_get_max_background_compactions(copy));
2408
- CheckCondition(5 == rocksdb_options_get_max_background_flushes(copy));
2409
- CheckCondition(6 == rocksdb_options_get_max_log_file_size(copy));
2410
- CheckCondition(7 == rocksdb_options_get_log_file_time_to_roll(copy));
2411
- CheckCondition(8 == rocksdb_options_get_keep_log_file_num(copy));
2412
- CheckCondition(9 == rocksdb_options_get_recycle_log_file_num(copy));
2413
- CheckCondition(
2414
- 10 == rocksdb_options_get_soft_pending_compaction_bytes_limit(copy));
2415
- CheckCondition(
2416
- 11 == rocksdb_options_get_hard_pending_compaction_bytes_limit(copy));
2417
- CheckCondition(12 == rocksdb_options_get_max_manifest_file_size(copy));
2418
- CheckCondition(13 == rocksdb_options_get_table_cache_numshardbits(copy));
2419
- CheckCondition(14 == rocksdb_options_get_arena_block_size(copy));
2420
- CheckCondition(1 == rocksdb_options_get_use_fsync(copy));
2421
- CheckCondition(15 == rocksdb_options_get_WAL_ttl_seconds(copy));
2422
- CheckCondition(16 == rocksdb_options_get_WAL_size_limit_MB(copy));
2423
- CheckCondition(17 == rocksdb_options_get_manifest_preallocation_size(copy));
2424
- CheckCondition(1 == rocksdb_options_get_allow_mmap_reads(copy));
2425
- CheckCondition(1 == rocksdb_options_get_allow_mmap_writes(copy));
2426
- CheckCondition(1 == rocksdb_options_get_use_direct_reads(copy));
2427
- CheckCondition(
2428
- 1 == rocksdb_options_get_use_direct_io_for_flush_and_compaction(copy));
2429
- CheckCondition(1 == rocksdb_options_get_is_fd_close_on_exec(copy));
2430
- CheckCondition(18 == rocksdb_options_get_stats_dump_period_sec(copy));
2431
- CheckCondition(5 == rocksdb_options_get_stats_persist_period_sec(copy));
2432
- CheckCondition(1 == rocksdb_options_get_advise_random_on_open(copy));
2433
- CheckCondition(1 == rocksdb_options_get_use_adaptive_mutex(copy));
2434
- CheckCondition(19 == rocksdb_options_get_bytes_per_sync(copy));
2435
- CheckCondition(20 == rocksdb_options_get_wal_bytes_per_sync(copy));
2436
- CheckCondition(21 ==
2437
- rocksdb_options_get_writable_file_max_buffer_size(copy));
2438
- CheckCondition(1 ==
2439
- rocksdb_options_get_allow_concurrent_memtable_write(copy));
2440
- CheckCondition(
2441
- 1 == rocksdb_options_get_enable_write_thread_adaptive_yield(copy));
2442
- CheckCondition(22 ==
2443
- rocksdb_options_get_max_sequential_skip_in_iterations(copy));
2444
- CheckCondition(1 == rocksdb_options_get_disable_auto_compactions(copy));
2445
- CheckCondition(1 == rocksdb_options_get_optimize_filters_for_hits(copy));
2446
- CheckCondition(
2447
- 23 == rocksdb_options_get_delete_obsolete_files_period_micros(copy));
2448
- CheckCondition(2.0 ==
2449
- rocksdb_options_get_memtable_prefix_bloom_size_ratio(copy));
2450
- CheckCondition(24 == rocksdb_options_get_max_compaction_bytes(copy));
2451
- CheckCondition(25 == rocksdb_options_get_memtable_huge_page_size(copy));
2452
- CheckCondition(26 == rocksdb_options_get_max_successive_merges(copy));
2453
- CheckCondition(27 == rocksdb_options_get_bloom_locality(copy));
2454
- CheckCondition(1 == rocksdb_options_get_inplace_update_support(copy));
2455
- CheckCondition(28 == rocksdb_options_get_inplace_update_num_locks(copy));
2456
- CheckCondition(1 == rocksdb_options_get_report_bg_io_stats(copy));
2457
- CheckCondition(2 == rocksdb_options_get_wal_recovery_mode(copy));
2458
- CheckCondition(5 == rocksdb_options_get_compression(copy));
2459
- CheckCondition(4 == rocksdb_options_get_bottommost_compression(copy));
2460
- CheckCondition(2 == rocksdb_options_get_compaction_style(copy));
2461
- CheckCondition(1 == rocksdb_options_get_atomic_flush(copy));
2462
- CheckCondition(29.0 ==
2463
- rocksdb_options_get_experimental_mempurge_threshold(copy));
2464
-
2465
- // Copies should be independent.
2466
- rocksdb_options_set_allow_ingest_behind(copy, 0);
2467
- CheckCondition(0 == rocksdb_options_get_allow_ingest_behind(copy));
2468
- CheckCondition(1 == rocksdb_options_get_allow_ingest_behind(o));
2469
-
2470
- rocksdb_options_compaction_readahead_size(copy, 20);
2471
- CheckCondition(20 == rocksdb_options_get_compaction_readahead_size(copy));
2472
- CheckCondition(10 == rocksdb_options_get_compaction_readahead_size(o));
2473
-
2474
- rocksdb_options_set_create_if_missing(copy, 0);
2475
- CheckCondition(0 == rocksdb_options_get_create_if_missing(copy));
2476
- CheckCondition(1 == rocksdb_options_get_create_if_missing(o));
2477
-
2478
- rocksdb_options_set_create_missing_column_families(copy, 0);
2479
- CheckCondition(0 ==
2480
- rocksdb_options_get_create_missing_column_families(copy));
2481
- CheckCondition(1 == rocksdb_options_get_create_missing_column_families(o));
2482
-
2483
- rocksdb_options_set_error_if_exists(copy, 0);
2484
- CheckCondition(0 == rocksdb_options_get_error_if_exists(copy));
2485
- CheckCondition(1 == rocksdb_options_get_error_if_exists(o));
2486
-
2487
- rocksdb_options_set_paranoid_checks(copy, 0);
2488
- CheckCondition(0 == rocksdb_options_get_paranoid_checks(copy));
2489
- CheckCondition(1 == rocksdb_options_get_paranoid_checks(o));
2490
-
2491
- rocksdb_options_set_info_log_level(copy, 2);
2492
- CheckCondition(2 == rocksdb_options_get_info_log_level(copy));
2493
- CheckCondition(3 == rocksdb_options_get_info_log_level(o));
2494
-
2495
- rocksdb_options_set_write_buffer_size(copy, 200);
2496
- CheckCondition(200 == rocksdb_options_get_write_buffer_size(copy));
2497
- CheckCondition(100 == rocksdb_options_get_write_buffer_size(o));
2498
-
2499
- rocksdb_options_set_db_write_buffer_size(copy, 2000);
2500
- CheckCondition(2000 == rocksdb_options_get_db_write_buffer_size(copy));
2501
- CheckCondition(1000 == rocksdb_options_get_db_write_buffer_size(o));
2502
-
2503
- rocksdb_options_set_max_open_files(copy, 42);
2504
- CheckCondition(42 == rocksdb_options_get_max_open_files(copy));
2505
- CheckCondition(21 == rocksdb_options_get_max_open_files(o));
2506
-
2507
- rocksdb_options_set_max_file_opening_threads(copy, 3);
2508
- CheckCondition(3 == rocksdb_options_get_max_file_opening_threads(copy));
2509
- CheckCondition(5 == rocksdb_options_get_max_file_opening_threads(o));
2510
-
2511
- rocksdb_options_set_max_total_wal_size(copy, 4000);
2512
- CheckCondition(4000 == rocksdb_options_get_max_total_wal_size(copy));
2513
- CheckCondition(400 == rocksdb_options_get_max_total_wal_size(o));
2514
-
2515
- rocksdb_options_set_num_levels(copy, 6);
2516
- CheckCondition(6 == rocksdb_options_get_num_levels(copy));
2517
- CheckCondition(7 == rocksdb_options_get_num_levels(o));
2518
-
2519
- rocksdb_options_set_level0_file_num_compaction_trigger(copy, 14);
2520
- CheckCondition(
2521
- 14 == rocksdb_options_get_level0_file_num_compaction_trigger(copy));
2522
- CheckCondition(4 ==
2523
- rocksdb_options_get_level0_file_num_compaction_trigger(o));
2524
-
2525
- rocksdb_options_set_level0_slowdown_writes_trigger(copy, 61);
2526
- CheckCondition(61 ==
2527
- rocksdb_options_get_level0_slowdown_writes_trigger(copy));
2528
- CheckCondition(6 == rocksdb_options_get_level0_slowdown_writes_trigger(o));
2529
-
2530
- rocksdb_options_set_level0_stop_writes_trigger(copy, 17);
2531
- CheckCondition(17 == rocksdb_options_get_level0_stop_writes_trigger(copy));
2532
- CheckCondition(8 == rocksdb_options_get_level0_stop_writes_trigger(o));
2533
-
2534
- rocksdb_options_set_target_file_size_base(copy, 128);
2535
- CheckCondition(128 == rocksdb_options_get_target_file_size_base(copy));
2536
- CheckCondition(256 == rocksdb_options_get_target_file_size_base(o));
2537
-
2538
- rocksdb_options_set_target_file_size_multiplier(copy, 13);
2539
- CheckCondition(13 == rocksdb_options_get_target_file_size_multiplier(copy));
2540
- CheckCondition(3 == rocksdb_options_get_target_file_size_multiplier(o));
2541
-
2542
- rocksdb_options_set_max_bytes_for_level_base(copy, 900);
2543
- CheckCondition(900 == rocksdb_options_get_max_bytes_for_level_base(copy));
2544
- CheckCondition(1024 == rocksdb_options_get_max_bytes_for_level_base(o));
2545
-
2546
- rocksdb_options_set_level_compaction_dynamic_level_bytes(copy, 0);
2547
- CheckCondition(
2548
- 0 == rocksdb_options_get_level_compaction_dynamic_level_bytes(copy));
2549
- CheckCondition(1 ==
2550
- rocksdb_options_get_level_compaction_dynamic_level_bytes(o));
2551
-
2552
- rocksdb_options_set_max_bytes_for_level_multiplier(copy, 8.0);
2553
- CheckCondition(8.0 ==
2554
- rocksdb_options_get_max_bytes_for_level_multiplier(copy));
2555
- CheckCondition(2.0 ==
2556
- rocksdb_options_get_max_bytes_for_level_multiplier(o));
2557
-
2558
- rocksdb_options_set_periodic_compaction_seconds(copy, 8000);
2559
- CheckCondition(8000 ==
2560
- rocksdb_options_get_periodic_compaction_seconds(copy));
2561
- CheckCondition(100000 ==
2562
- rocksdb_options_get_periodic_compaction_seconds(o));
2563
-
2564
- rocksdb_options_set_ttl(copy, 8000);
2565
- CheckCondition(8000 == rocksdb_options_get_ttl(copy));
2566
- CheckCondition(5000 == rocksdb_options_get_ttl(o));
2567
-
2568
- rocksdb_options_set_skip_stats_update_on_db_open(copy, 0);
2569
- CheckCondition(0 == rocksdb_options_get_skip_stats_update_on_db_open(copy));
2570
- CheckCondition(1 == rocksdb_options_get_skip_stats_update_on_db_open(o));
2571
-
2572
- rocksdb_options_set_skip_checking_sst_file_sizes_on_db_open(copy, 0);
2573
- CheckCondition(
2574
- 0 == rocksdb_options_get_skip_checking_sst_file_sizes_on_db_open(copy));
2575
- CheckCondition(
2576
- 1 == rocksdb_options_get_skip_checking_sst_file_sizes_on_db_open(o));
2577
-
2578
- rocksdb_options_set_max_write_buffer_number(copy, 2000);
2579
- CheckCondition(2000 == rocksdb_options_get_max_write_buffer_number(copy));
2580
- CheckCondition(97 == rocksdb_options_get_max_write_buffer_number(o));
2581
-
2582
- rocksdb_options_set_min_write_buffer_number_to_merge(copy, 146);
2583
- CheckCondition(146 ==
2584
- rocksdb_options_get_min_write_buffer_number_to_merge(copy));
2585
- CheckCondition(23 ==
2586
- rocksdb_options_get_min_write_buffer_number_to_merge(o));
2587
-
2588
- rocksdb_options_set_max_write_buffer_number_to_maintain(copy, 128);
2589
- CheckCondition(
2590
- 128 == rocksdb_options_get_max_write_buffer_number_to_maintain(copy));
2591
- CheckCondition(64 ==
2592
- rocksdb_options_get_max_write_buffer_number_to_maintain(o));
2593
-
2594
- rocksdb_options_set_max_write_buffer_size_to_maintain(copy, 9000);
2595
- CheckCondition(9000 ==
2596
- rocksdb_options_get_max_write_buffer_size_to_maintain(copy));
2597
- CheckCondition(50000 ==
2598
- rocksdb_options_get_max_write_buffer_size_to_maintain(o));
2599
-
2600
- rocksdb_options_set_enable_pipelined_write(copy, 0);
2601
- CheckCondition(0 == rocksdb_options_get_enable_pipelined_write(copy));
2602
- CheckCondition(1 == rocksdb_options_get_enable_pipelined_write(o));
2603
-
2604
- rocksdb_options_set_unordered_write(copy, 0);
2605
- CheckCondition(0 == rocksdb_options_get_unordered_write(copy));
2606
- CheckCondition(1 == rocksdb_options_get_unordered_write(o));
2607
-
2608
- rocksdb_options_set_max_subcompactions(copy, 90001);
2609
- CheckCondition(90001 == rocksdb_options_get_max_subcompactions(copy));
2610
- CheckCondition(123456 == rocksdb_options_get_max_subcompactions(o));
2611
-
2612
- rocksdb_options_set_max_background_jobs(copy, 12);
2613
- CheckCondition(12 == rocksdb_options_get_max_background_jobs(copy));
2614
- CheckCondition(2 == rocksdb_options_get_max_background_jobs(o));
2615
-
2616
- rocksdb_options_set_max_background_compactions(copy, 13);
2617
- CheckCondition(13 == rocksdb_options_get_max_background_compactions(copy));
2618
- CheckCondition(3 == rocksdb_options_get_max_background_compactions(o));
2619
-
2620
- rocksdb_options_set_max_background_flushes(copy, 15);
2621
- CheckCondition(15 == rocksdb_options_get_max_background_flushes(copy));
2622
- CheckCondition(5 == rocksdb_options_get_max_background_flushes(o));
2623
-
2624
- rocksdb_options_set_max_log_file_size(copy, 16);
2625
- CheckCondition(16 == rocksdb_options_get_max_log_file_size(copy));
2626
- CheckCondition(6 == rocksdb_options_get_max_log_file_size(o));
2627
-
2628
- rocksdb_options_set_log_file_time_to_roll(copy, 17);
2629
- CheckCondition(17 == rocksdb_options_get_log_file_time_to_roll(copy));
2630
- CheckCondition(7 == rocksdb_options_get_log_file_time_to_roll(o));
2631
-
2632
- rocksdb_options_set_keep_log_file_num(copy, 18);
2633
- CheckCondition(18 == rocksdb_options_get_keep_log_file_num(copy));
2634
- CheckCondition(8 == rocksdb_options_get_keep_log_file_num(o));
2635
-
2636
- rocksdb_options_set_recycle_log_file_num(copy, 19);
2637
- CheckCondition(19 == rocksdb_options_get_recycle_log_file_num(copy));
2638
- CheckCondition(9 == rocksdb_options_get_recycle_log_file_num(o));
2639
-
2640
- rocksdb_options_set_soft_pending_compaction_bytes_limit(copy, 110);
2641
- CheckCondition(
2642
- 110 == rocksdb_options_get_soft_pending_compaction_bytes_limit(copy));
2643
- CheckCondition(10 ==
2644
- rocksdb_options_get_soft_pending_compaction_bytes_limit(o));
2645
-
2646
- rocksdb_options_set_hard_pending_compaction_bytes_limit(copy, 111);
2647
- CheckCondition(
2648
- 111 == rocksdb_options_get_hard_pending_compaction_bytes_limit(copy));
2649
- CheckCondition(11 ==
2650
- rocksdb_options_get_hard_pending_compaction_bytes_limit(o));
2651
-
2652
- rocksdb_options_set_max_manifest_file_size(copy, 112);
2653
- CheckCondition(112 == rocksdb_options_get_max_manifest_file_size(copy));
2654
- CheckCondition(12 == rocksdb_options_get_max_manifest_file_size(o));
2655
-
2656
- rocksdb_options_set_table_cache_numshardbits(copy, 113);
2657
- CheckCondition(113 == rocksdb_options_get_table_cache_numshardbits(copy));
2658
- CheckCondition(13 == rocksdb_options_get_table_cache_numshardbits(o));
2659
-
2660
- rocksdb_options_set_arena_block_size(copy, 114);
2661
- CheckCondition(114 == rocksdb_options_get_arena_block_size(copy));
2662
- CheckCondition(14 == rocksdb_options_get_arena_block_size(o));
2663
-
2664
- rocksdb_options_set_use_fsync(copy, 0);
2665
- CheckCondition(0 == rocksdb_options_get_use_fsync(copy));
2666
- CheckCondition(1 == rocksdb_options_get_use_fsync(o));
2667
-
2668
- rocksdb_options_set_WAL_ttl_seconds(copy, 115);
2669
- CheckCondition(115 == rocksdb_options_get_WAL_ttl_seconds(copy));
2670
- CheckCondition(15 == rocksdb_options_get_WAL_ttl_seconds(o));
2671
-
2672
- rocksdb_options_set_WAL_size_limit_MB(copy, 116);
2673
- CheckCondition(116 == rocksdb_options_get_WAL_size_limit_MB(copy));
2674
- CheckCondition(16 == rocksdb_options_get_WAL_size_limit_MB(o));
2675
-
2676
- rocksdb_options_set_manifest_preallocation_size(copy, 117);
2677
- CheckCondition(117 ==
2678
- rocksdb_options_get_manifest_preallocation_size(copy));
2679
- CheckCondition(17 == rocksdb_options_get_manifest_preallocation_size(o));
2680
-
2681
- rocksdb_options_set_allow_mmap_reads(copy, 0);
2682
- CheckCondition(0 == rocksdb_options_get_allow_mmap_reads(copy));
2683
- CheckCondition(1 == rocksdb_options_get_allow_mmap_reads(o));
2684
-
2685
- rocksdb_options_set_allow_mmap_writes(copy, 0);
2686
- CheckCondition(0 == rocksdb_options_get_allow_mmap_writes(copy));
2687
- CheckCondition(1 == rocksdb_options_get_allow_mmap_writes(o));
2688
-
2689
- rocksdb_options_set_use_direct_reads(copy, 0);
2690
- CheckCondition(0 == rocksdb_options_get_use_direct_reads(copy));
2691
- CheckCondition(1 == rocksdb_options_get_use_direct_reads(o));
2692
-
2693
- rocksdb_options_set_use_direct_io_for_flush_and_compaction(copy, 0);
2694
- CheckCondition(
2695
- 0 == rocksdb_options_get_use_direct_io_for_flush_and_compaction(copy));
2696
- CheckCondition(
2697
- 1 == rocksdb_options_get_use_direct_io_for_flush_and_compaction(o));
2698
-
2699
- rocksdb_options_set_is_fd_close_on_exec(copy, 0);
2700
- CheckCondition(0 == rocksdb_options_get_is_fd_close_on_exec(copy));
2701
- CheckCondition(1 == rocksdb_options_get_is_fd_close_on_exec(o));
2702
-
2703
- rocksdb_options_set_stats_dump_period_sec(copy, 218);
2704
- CheckCondition(218 == rocksdb_options_get_stats_dump_period_sec(copy));
2705
- CheckCondition(18 == rocksdb_options_get_stats_dump_period_sec(o));
2706
-
2707
- rocksdb_options_set_stats_persist_period_sec(copy, 600);
2708
- CheckCondition(600 == rocksdb_options_get_stats_persist_period_sec(copy));
2709
- CheckCondition(5 == rocksdb_options_get_stats_persist_period_sec(o));
2710
-
2711
- rocksdb_options_set_advise_random_on_open(copy, 0);
2712
- CheckCondition(0 == rocksdb_options_get_advise_random_on_open(copy));
2713
- CheckCondition(1 == rocksdb_options_get_advise_random_on_open(o));
2714
-
2715
- rocksdb_options_set_use_adaptive_mutex(copy, 0);
2716
- CheckCondition(0 == rocksdb_options_get_use_adaptive_mutex(copy));
2717
- CheckCondition(1 == rocksdb_options_get_use_adaptive_mutex(o));
2718
-
2719
- rocksdb_options_set_bytes_per_sync(copy, 219);
2720
- CheckCondition(219 == rocksdb_options_get_bytes_per_sync(copy));
2721
- CheckCondition(19 == rocksdb_options_get_bytes_per_sync(o));
2722
-
2723
- rocksdb_options_set_wal_bytes_per_sync(copy, 120);
2724
- CheckCondition(120 == rocksdb_options_get_wal_bytes_per_sync(copy));
2725
- CheckCondition(20 == rocksdb_options_get_wal_bytes_per_sync(o));
2726
-
2727
- rocksdb_options_set_writable_file_max_buffer_size(copy, 121);
2728
- CheckCondition(121 ==
2729
- rocksdb_options_get_writable_file_max_buffer_size(copy));
2730
- CheckCondition(21 == rocksdb_options_get_writable_file_max_buffer_size(o));
2731
-
2732
- rocksdb_options_set_allow_concurrent_memtable_write(copy, 0);
2733
- CheckCondition(0 ==
2734
- rocksdb_options_get_allow_concurrent_memtable_write(copy));
2735
- CheckCondition(1 == rocksdb_options_get_allow_concurrent_memtable_write(o));
2736
-
2737
- rocksdb_options_set_enable_write_thread_adaptive_yield(copy, 0);
2738
- CheckCondition(
2739
- 0 == rocksdb_options_get_enable_write_thread_adaptive_yield(copy));
2740
- CheckCondition(1 ==
2741
- rocksdb_options_get_enable_write_thread_adaptive_yield(o));
2742
-
2743
- rocksdb_options_set_max_sequential_skip_in_iterations(copy, 122);
2744
- CheckCondition(122 ==
2745
- rocksdb_options_get_max_sequential_skip_in_iterations(copy));
2746
- CheckCondition(22 ==
2747
- rocksdb_options_get_max_sequential_skip_in_iterations(o));
2748
-
2749
- rocksdb_options_set_disable_auto_compactions(copy, 0);
2750
- CheckCondition(0 == rocksdb_options_get_disable_auto_compactions(copy));
2751
- CheckCondition(1 == rocksdb_options_get_disable_auto_compactions(o));
2752
-
2753
- rocksdb_options_set_optimize_filters_for_hits(copy, 0);
2754
- CheckCondition(0 == rocksdb_options_get_optimize_filters_for_hits(copy));
2755
- CheckCondition(1 == rocksdb_options_get_optimize_filters_for_hits(o));
2756
-
2757
- rocksdb_options_set_delete_obsolete_files_period_micros(copy, 123);
2758
- CheckCondition(
2759
- 123 == rocksdb_options_get_delete_obsolete_files_period_micros(copy));
2760
- CheckCondition(23 ==
2761
- rocksdb_options_get_delete_obsolete_files_period_micros(o));
2762
-
2763
- rocksdb_options_set_memtable_prefix_bloom_size_ratio(copy, 4.0);
2764
- CheckCondition(4.0 ==
2765
- rocksdb_options_get_memtable_prefix_bloom_size_ratio(copy));
2766
- CheckCondition(2.0 ==
2767
- rocksdb_options_get_memtable_prefix_bloom_size_ratio(o));
2768
-
2769
- rocksdb_options_set_max_compaction_bytes(copy, 124);
2770
- CheckCondition(124 == rocksdb_options_get_max_compaction_bytes(copy));
2771
- CheckCondition(24 == rocksdb_options_get_max_compaction_bytes(o));
2772
-
2773
- rocksdb_options_set_memtable_huge_page_size(copy, 125);
2774
- CheckCondition(125 == rocksdb_options_get_memtable_huge_page_size(copy));
2775
- CheckCondition(25 == rocksdb_options_get_memtable_huge_page_size(o));
2776
-
2777
- rocksdb_options_set_max_successive_merges(copy, 126);
2778
- CheckCondition(126 == rocksdb_options_get_max_successive_merges(copy));
2779
- CheckCondition(26 == rocksdb_options_get_max_successive_merges(o));
2780
-
2781
- rocksdb_options_set_bloom_locality(copy, 127);
2782
- CheckCondition(127 == rocksdb_options_get_bloom_locality(copy));
2783
- CheckCondition(27 == rocksdb_options_get_bloom_locality(o));
2784
-
2785
- rocksdb_options_set_inplace_update_support(copy, 0);
2786
- CheckCondition(0 == rocksdb_options_get_inplace_update_support(copy));
2787
- CheckCondition(1 == rocksdb_options_get_inplace_update_support(o));
2788
-
2789
- rocksdb_options_set_inplace_update_num_locks(copy, 128);
2790
- CheckCondition(128 == rocksdb_options_get_inplace_update_num_locks(copy));
2791
- CheckCondition(28 == rocksdb_options_get_inplace_update_num_locks(o));
2792
-
2793
- rocksdb_options_set_report_bg_io_stats(copy, 0);
2794
- CheckCondition(0 == rocksdb_options_get_report_bg_io_stats(copy));
2795
- CheckCondition(1 == rocksdb_options_get_report_bg_io_stats(o));
2796
-
2797
- rocksdb_options_set_wal_recovery_mode(copy, 1);
2798
- CheckCondition(1 == rocksdb_options_get_wal_recovery_mode(copy));
2799
- CheckCondition(2 == rocksdb_options_get_wal_recovery_mode(o));
2800
-
2801
- rocksdb_options_set_compression(copy, 4);
2802
- CheckCondition(4 == rocksdb_options_get_compression(copy));
2803
- CheckCondition(5 == rocksdb_options_get_compression(o));
2804
-
2805
- rocksdb_options_set_bottommost_compression(copy, 3);
2806
- CheckCondition(3 == rocksdb_options_get_bottommost_compression(copy));
2807
- CheckCondition(4 == rocksdb_options_get_bottommost_compression(o));
2808
-
2809
- rocksdb_options_set_compaction_style(copy, 1);
2810
- CheckCondition(1 == rocksdb_options_get_compaction_style(copy));
2811
- CheckCondition(2 == rocksdb_options_get_compaction_style(o));
2812
-
2813
- rocksdb_options_set_compaction_pri(copy, 1);
2814
- CheckCondition(1 == rocksdb_options_get_compaction_pri(copy));
2815
- CheckCondition(4 == rocksdb_options_get_compaction_pri(o));
2816
-
2817
- rocksdb_options_set_atomic_flush(copy, 0);
2818
- CheckCondition(0 == rocksdb_options_get_atomic_flush(copy));
2819
- CheckCondition(1 == rocksdb_options_get_atomic_flush(o));
2820
-
2821
- rocksdb_options_set_experimental_mempurge_threshold(copy, 229.0);
2822
- CheckCondition(229.0 ==
2823
- rocksdb_options_get_experimental_mempurge_threshold(copy));
2824
- CheckCondition(29.0 ==
2825
- rocksdb_options_get_experimental_mempurge_threshold(o));
2826
-
2827
- rocksdb_options_destroy(copy);
2828
- rocksdb_options_destroy(o);
2829
- }
2830
-
2831
- StartPhase("read_options");
2832
- {
2833
- rocksdb_readoptions_t* ro;
2834
- ro = rocksdb_readoptions_create();
2835
-
2836
- rocksdb_readoptions_set_verify_checksums(ro, 1);
2837
- CheckCondition(1 == rocksdb_readoptions_get_verify_checksums(ro));
2838
-
2839
- rocksdb_readoptions_set_fill_cache(ro, 1);
2840
- CheckCondition(1 == rocksdb_readoptions_get_fill_cache(ro));
2841
-
2842
- rocksdb_readoptions_set_read_tier(ro, 2);
2843
- CheckCondition(2 == rocksdb_readoptions_get_read_tier(ro));
2844
-
2845
- rocksdb_readoptions_set_tailing(ro, 1);
2846
- CheckCondition(1 == rocksdb_readoptions_get_tailing(ro));
2847
-
2848
- rocksdb_readoptions_set_readahead_size(ro, 100);
2849
- CheckCondition(100 == rocksdb_readoptions_get_readahead_size(ro));
2850
-
2851
- rocksdb_readoptions_set_prefix_same_as_start(ro, 1);
2852
- CheckCondition(1 == rocksdb_readoptions_get_prefix_same_as_start(ro));
2853
-
2854
- rocksdb_readoptions_set_pin_data(ro, 1);
2855
- CheckCondition(1 == rocksdb_readoptions_get_pin_data(ro));
2856
-
2857
- rocksdb_readoptions_set_total_order_seek(ro, 1);
2858
- CheckCondition(1 == rocksdb_readoptions_get_total_order_seek(ro));
2859
-
2860
- rocksdb_readoptions_set_max_skippable_internal_keys(ro, 200);
2861
- CheckCondition(200 ==
2862
- rocksdb_readoptions_get_max_skippable_internal_keys(ro));
2863
-
2864
- rocksdb_readoptions_set_background_purge_on_iterator_cleanup(ro, 1);
2865
- CheckCondition(
2866
- 1 == rocksdb_readoptions_get_background_purge_on_iterator_cleanup(ro));
2867
-
2868
- rocksdb_readoptions_set_ignore_range_deletions(ro, 1);
2869
- CheckCondition(1 == rocksdb_readoptions_get_ignore_range_deletions(ro));
2870
-
2871
- rocksdb_readoptions_set_deadline(ro, 300);
2872
- CheckCondition(300 == rocksdb_readoptions_get_deadline(ro));
2873
-
2874
- rocksdb_readoptions_set_io_timeout(ro, 400);
2875
- CheckCondition(400 == rocksdb_readoptions_get_io_timeout(ro));
2876
-
2877
- rocksdb_readoptions_set_async_io(ro, 1);
2878
- CheckCondition(1 == rocksdb_readoptions_get_async_io(ro));
2879
-
2880
- rocksdb_readoptions_destroy(ro);
2881
- }
2882
-
2883
- StartPhase("write_options");
2884
- {
2885
- rocksdb_writeoptions_t* wo;
2886
- wo = rocksdb_writeoptions_create();
2887
-
2888
- rocksdb_writeoptions_set_sync(wo, 1);
2889
- CheckCondition(1 == rocksdb_writeoptions_get_sync(wo));
2890
-
2891
- rocksdb_writeoptions_disable_WAL(wo, 1);
2892
- CheckCondition(1 == rocksdb_writeoptions_get_disable_WAL(wo));
2893
-
2894
- rocksdb_writeoptions_set_ignore_missing_column_families(wo, 1);
2895
- CheckCondition(1 ==
2896
- rocksdb_writeoptions_get_ignore_missing_column_families(wo));
2897
-
2898
- rocksdb_writeoptions_set_no_slowdown(wo, 1);
2899
- CheckCondition(1 == rocksdb_writeoptions_get_no_slowdown(wo));
2900
-
2901
- rocksdb_writeoptions_set_low_pri(wo, 1);
2902
- CheckCondition(1 == rocksdb_writeoptions_get_low_pri(wo));
2903
-
2904
- rocksdb_writeoptions_set_memtable_insert_hint_per_batch(wo, 1);
2905
- CheckCondition(1 ==
2906
- rocksdb_writeoptions_get_memtable_insert_hint_per_batch(wo));
2907
-
2908
- rocksdb_writeoptions_destroy(wo);
2909
- }
2910
-
2911
- StartPhase("compact_options");
2912
- {
2913
- rocksdb_compactoptions_t* co;
2914
- co = rocksdb_compactoptions_create();
2915
-
2916
- rocksdb_compactoptions_set_exclusive_manual_compaction(co, 1);
2917
- CheckCondition(1 ==
2918
- rocksdb_compactoptions_get_exclusive_manual_compaction(co));
2919
-
2920
- rocksdb_compactoptions_set_bottommost_level_compaction(co, 1);
2921
- CheckCondition(1 ==
2922
- rocksdb_compactoptions_get_bottommost_level_compaction(co));
2923
-
2924
- rocksdb_compactoptions_set_change_level(co, 1);
2925
- CheckCondition(1 == rocksdb_compactoptions_get_change_level(co));
2926
-
2927
- rocksdb_compactoptions_set_target_level(co, 1);
2928
- CheckCondition(1 == rocksdb_compactoptions_get_target_level(co));
2929
-
2930
- rocksdb_compactoptions_destroy(co);
2931
- }
2932
-
2933
- StartPhase("flush_options");
2934
- {
2935
- rocksdb_flushoptions_t* fo;
2936
- fo = rocksdb_flushoptions_create();
2937
-
2938
- rocksdb_flushoptions_set_wait(fo, 1);
2939
- CheckCondition(1 == rocksdb_flushoptions_get_wait(fo));
2940
-
2941
- rocksdb_flushoptions_destroy(fo);
2942
- }
2943
-
2944
- StartPhase("cache_options");
2945
- {
2946
- rocksdb_cache_t* co;
2947
- co = rocksdb_cache_create_lru(100);
2948
- CheckCondition(100 == rocksdb_cache_get_capacity(co));
2949
-
2950
- rocksdb_cache_set_capacity(co, 200);
2951
- CheckCondition(200 == rocksdb_cache_get_capacity(co));
2952
-
2953
- rocksdb_cache_destroy(co);
2954
- }
2955
-
2956
- StartPhase("jemalloc_nodump_allocator");
2957
- {
2958
- rocksdb_memory_allocator_t* allocator;
2959
- allocator = rocksdb_jemalloc_nodump_allocator_create(&err);
2960
- if (err != NULL) {
2961
- // not supported on all platforms, allow unsupported error
2962
- const char* ni = "Not implemented: ";
2963
- size_t ni_len = strlen(ni);
2964
- size_t err_len = strlen(err);
2965
-
2966
- CheckCondition(err_len >= ni_len);
2967
- CheckCondition(memcmp(ni, err, ni_len) == 0);
2968
- Free(&err);
2969
- } else {
2970
- rocksdb_cache_t* co;
2971
- rocksdb_lru_cache_options_t* copts;
2972
-
2973
- copts = rocksdb_lru_cache_options_create();
2974
-
2975
- rocksdb_lru_cache_options_set_capacity(copts, 100);
2976
- rocksdb_lru_cache_options_set_memory_allocator(copts, allocator);
2977
-
2978
- co = rocksdb_cache_create_lru_opts(copts);
2979
- CheckCondition(100 == rocksdb_cache_get_capacity(co));
2980
-
2981
- rocksdb_cache_destroy(co);
2982
- rocksdb_lru_cache_options_destroy(copts);
2983
- }
2984
- rocksdb_memory_allocator_destroy(allocator);
2985
- }
2986
-
2987
- StartPhase("stderr_logger");
2988
- {
2989
- rocksdb_options_t* o_no_prefix = rocksdb_options_create();
2990
- rocksdb_logger_t* no_prefix_logger =
2991
- rocksdb_logger_create_stderr_logger(3, NULL);
2992
- rocksdb_options_set_info_log(o_no_prefix, no_prefix_logger);
2993
- rocksdb_logger_t* no_prefix_info_log =
2994
- rocksdb_options_get_info_log(o_no_prefix);
2995
- CheckCondition(no_prefix_info_log != NULL);
2996
- rocksdb_logger_destroy(no_prefix_logger);
2997
- rocksdb_logger_destroy(no_prefix_info_log);
2998
- rocksdb_options_destroy(o_no_prefix);
2999
-
3000
- rocksdb_options_t* o_prefix = rocksdb_options_create();
3001
- rocksdb_logger_t* prefix_logger =
3002
- rocksdb_logger_create_stderr_logger(3, "some prefix");
3003
- rocksdb_options_set_info_log(o_prefix, prefix_logger);
3004
- rocksdb_logger_t* prefix_info_log = rocksdb_options_get_info_log(o_prefix);
3005
- CheckCondition(prefix_info_log != NULL);
3006
- rocksdb_logger_destroy(prefix_logger);
3007
- rocksdb_logger_destroy(prefix_info_log);
3008
- rocksdb_options_destroy(o_prefix);
3009
- }
3010
-
3011
- StartPhase("env");
3012
- {
3013
- rocksdb_env_t* e;
3014
- e = rocksdb_create_default_env();
3015
-
3016
- rocksdb_env_set_background_threads(e, 10);
3017
- CheckCondition(10 == rocksdb_env_get_background_threads(e));
3018
-
3019
- rocksdb_env_set_high_priority_background_threads(e, 20);
3020
- CheckCondition(20 == rocksdb_env_get_high_priority_background_threads(e));
3021
-
3022
- rocksdb_env_set_low_priority_background_threads(e, 30);
3023
- CheckCondition(30 == rocksdb_env_get_low_priority_background_threads(e));
3024
-
3025
- rocksdb_env_set_bottom_priority_background_threads(e, 40);
3026
- CheckCondition(40 == rocksdb_env_get_bottom_priority_background_threads(e));
3027
-
3028
- rocksdb_env_destroy(e);
3029
- }
3030
-
3031
- StartPhase("universal_compaction_options");
3032
- {
3033
- rocksdb_universal_compaction_options_t* uco;
3034
- uco = rocksdb_universal_compaction_options_create();
3035
-
3036
- rocksdb_universal_compaction_options_set_size_ratio(uco, 5);
3037
- CheckCondition(5 ==
3038
- rocksdb_universal_compaction_options_get_size_ratio(uco));
3039
-
3040
- rocksdb_universal_compaction_options_set_min_merge_width(uco, 15);
3041
- CheckCondition(
3042
- 15 == rocksdb_universal_compaction_options_get_min_merge_width(uco));
3043
-
3044
- rocksdb_universal_compaction_options_set_max_merge_width(uco, 25);
3045
- CheckCondition(
3046
- 25 == rocksdb_universal_compaction_options_get_max_merge_width(uco));
3047
-
3048
- rocksdb_universal_compaction_options_set_max_size_amplification_percent(uco,
3049
- 35);
3050
- CheckCondition(
3051
- 35 ==
3052
- rocksdb_universal_compaction_options_get_max_size_amplification_percent(
3053
- uco));
3054
-
3055
- rocksdb_universal_compaction_options_set_compression_size_percent(uco, 45);
3056
- CheckCondition(
3057
- 45 ==
3058
- rocksdb_universal_compaction_options_get_compression_size_percent(uco));
3059
-
3060
- rocksdb_universal_compaction_options_set_stop_style(uco, 1);
3061
- CheckCondition(1 ==
3062
- rocksdb_universal_compaction_options_get_stop_style(uco));
3063
-
3064
- rocksdb_universal_compaction_options_destroy(uco);
3065
- }
3066
-
3067
- StartPhase("fifo_compaction_options");
3068
- {
3069
- rocksdb_fifo_compaction_options_t* fco;
3070
- fco = rocksdb_fifo_compaction_options_create();
3071
-
3072
- rocksdb_fifo_compaction_options_set_max_table_files_size(fco, 100000);
3073
- CheckCondition(
3074
- 100000 ==
3075
- rocksdb_fifo_compaction_options_get_max_table_files_size(fco));
3076
-
3077
- rocksdb_fifo_compaction_options_destroy(fco);
3078
- }
3079
-
3080
- StartPhase("backup_engine_option");
3081
- {
3082
- rocksdb_backup_engine_options_t* bdo;
3083
- bdo = rocksdb_backup_engine_options_create("path");
3084
-
3085
- rocksdb_backup_engine_options_set_share_table_files(bdo, 1);
3086
- CheckCondition(1 ==
3087
- rocksdb_backup_engine_options_get_share_table_files(bdo));
3088
-
3089
- rocksdb_backup_engine_options_set_sync(bdo, 1);
3090
- CheckCondition(1 == rocksdb_backup_engine_options_get_sync(bdo));
3091
-
3092
- rocksdb_backup_engine_options_set_destroy_old_data(bdo, 1);
3093
- CheckCondition(1 ==
3094
- rocksdb_backup_engine_options_get_destroy_old_data(bdo));
3095
-
3096
- rocksdb_backup_engine_options_set_backup_log_files(bdo, 1);
3097
- CheckCondition(1 ==
3098
- rocksdb_backup_engine_options_get_backup_log_files(bdo));
3099
-
3100
- rocksdb_backup_engine_options_set_backup_rate_limit(bdo, 123);
3101
- CheckCondition(123 ==
3102
- rocksdb_backup_engine_options_get_backup_rate_limit(bdo));
3103
-
3104
- rocksdb_backup_engine_options_set_restore_rate_limit(bdo, 37);
3105
- CheckCondition(37 ==
3106
- rocksdb_backup_engine_options_get_restore_rate_limit(bdo));
3107
-
3108
- rocksdb_backup_engine_options_set_max_background_operations(bdo, 20);
3109
- CheckCondition(
3110
- 20 == rocksdb_backup_engine_options_get_max_background_operations(bdo));
3111
-
3112
- rocksdb_backup_engine_options_set_callback_trigger_interval_size(bdo, 9000);
3113
- CheckCondition(
3114
- 9000 ==
3115
- rocksdb_backup_engine_options_get_callback_trigger_interval_size(bdo));
3116
-
3117
- rocksdb_backup_engine_options_set_max_valid_backups_to_open(bdo, 40);
3118
- CheckCondition(
3119
- 40 == rocksdb_backup_engine_options_get_max_valid_backups_to_open(bdo));
3120
-
3121
- rocksdb_backup_engine_options_set_share_files_with_checksum_naming(bdo, 2);
3122
- CheckCondition(
3123
- 2 == rocksdb_backup_engine_options_get_share_files_with_checksum_naming(
3124
- bdo));
3125
-
3126
- rocksdb_backup_engine_options_destroy(bdo);
3127
- }
3128
-
3129
- StartPhase("compression_options");
3130
- {
3131
- rocksdb_options_t* co;
3132
- co = rocksdb_options_create();
3133
-
3134
- rocksdb_options_set_compression_options_zstd_max_train_bytes(co, 100);
3135
- CheckCondition(
3136
- 100 ==
3137
- rocksdb_options_get_compression_options_zstd_max_train_bytes(co));
3138
-
3139
- rocksdb_options_set_compression_options_parallel_threads(co, 2);
3140
- CheckCondition(
3141
- 2 == rocksdb_options_get_compression_options_parallel_threads(co));
3142
-
3143
- rocksdb_options_set_compression_options_max_dict_buffer_bytes(co, 200);
3144
- CheckCondition(
3145
- 200 ==
3146
- rocksdb_options_get_compression_options_max_dict_buffer_bytes(co));
3147
-
3148
- rocksdb_options_set_compression_options_use_zstd_dict_trainer(co, 0);
3149
- CheckCondition(
3150
- 0 == rocksdb_options_get_compression_options_use_zstd_dict_trainer(co));
3151
- rocksdb_options_destroy(co);
3152
- }
3153
-
3154
- StartPhase("iterate_upper_bound");
3155
- {
3156
- // Create new empty database
3157
- rocksdb_close(db);
3158
- rocksdb_destroy_db(options, dbname, &err);
3159
- CheckNoError(err);
3160
-
3161
- rocksdb_options_set_prefix_extractor(options, NULL);
3162
- db = rocksdb_open(options, dbname, &err);
3163
- CheckNoError(err);
3164
-
3165
- rocksdb_put(db, woptions, "a", 1, "0", 1, &err);
3166
- CheckNoError(err);
3167
- rocksdb_put(db, woptions, "foo", 3, "bar", 3, &err);
3168
- CheckNoError(err);
3169
- rocksdb_put(db, woptions, "foo1", 4, "bar1", 4, &err);
3170
- CheckNoError(err);
3171
- rocksdb_put(db, woptions, "g1", 2, "0", 1, &err);
3172
- CheckNoError(err);
3173
-
3174
- // testing basic case with no iterate_upper_bound and no prefix_extractor
3175
- {
3176
- rocksdb_readoptions_set_iterate_upper_bound(roptions, NULL, 0);
3177
- rocksdb_iterator_t* iter = rocksdb_create_iterator(db, roptions);
3178
-
3179
- rocksdb_iter_seek(iter, "foo", 3);
3180
- CheckCondition(rocksdb_iter_valid(iter));
3181
- CheckIter(iter, "foo", "bar");
3182
-
3183
- rocksdb_iter_next(iter);
3184
- CheckCondition(rocksdb_iter_valid(iter));
3185
- CheckIter(iter, "foo1", "bar1");
3186
-
3187
- rocksdb_iter_next(iter);
3188
- CheckCondition(rocksdb_iter_valid(iter));
3189
- CheckIter(iter, "g1", "0");
3190
-
3191
- rocksdb_iter_destroy(iter);
3192
- }
3193
-
3194
- // testing iterate_upper_bound and forward iterator
3195
- // to make sure it stops at bound
3196
- {
3197
- // iterate_upper_bound points beyond the last expected entry
3198
- rocksdb_readoptions_set_iterate_upper_bound(roptions, "foo2", 4);
3199
-
3200
- rocksdb_iterator_t* iter = rocksdb_create_iterator(db, roptions);
3201
-
3202
- rocksdb_iter_seek(iter, "foo", 3);
3203
- CheckCondition(rocksdb_iter_valid(iter));
3204
- CheckIter(iter, "foo", "bar");
3205
-
3206
- rocksdb_iter_next(iter);
3207
- CheckCondition(rocksdb_iter_valid(iter));
3208
- CheckIter(iter, "foo1", "bar1");
3209
-
3210
- rocksdb_iter_next(iter);
3211
- // should stop here...
3212
- CheckCondition(!rocksdb_iter_valid(iter));
3213
-
3214
- rocksdb_iter_destroy(iter);
3215
- rocksdb_readoptions_set_iterate_upper_bound(roptions, NULL, 0);
3216
- }
3217
- }
3218
-
3219
- StartPhase("transactions");
3220
- {
3221
- rocksdb_close(db);
3222
- rocksdb_destroy_db(options, dbname, &err);
3223
- CheckNoError(err);
3224
-
3225
- // open a TransactionDB
3226
- txn_db_options = rocksdb_transactiondb_options_create();
3227
- txn_options = rocksdb_transaction_options_create();
3228
- rocksdb_options_set_create_if_missing(options, 1);
3229
- txn_db = rocksdb_transactiondb_open(options, txn_db_options, dbname, &err);
3230
- CheckNoError(err);
3231
-
3232
- // put outside a transaction
3233
- rocksdb_transactiondb_put(txn_db, woptions, "foo", 3, "hello", 5, &err);
3234
- CheckNoError(err);
3235
- CheckTxnDBGet(txn_db, roptions, "foo", "hello");
3236
- CheckTxnDBPinGet(txn_db, roptions, "foo", "hello");
3237
-
3238
- // delete from outside transaction
3239
- rocksdb_transactiondb_delete(txn_db, woptions, "foo", 3, &err);
3240
- CheckNoError(err);
3241
- CheckTxnDBGet(txn_db, roptions, "foo", NULL);
3242
- CheckTxnDBPinGet(txn_db, roptions, "foo", NULL);
3243
-
3244
- // write batch into TransactionDB
3245
- rocksdb_writebatch_t* wb = rocksdb_writebatch_create();
3246
- rocksdb_writebatch_put(wb, "foo", 3, "a", 1);
3247
- rocksdb_writebatch_clear(wb);
3248
- rocksdb_writebatch_put(wb, "bar", 3, "b", 1);
3249
- rocksdb_writebatch_put(wb, "box", 3, "c", 1);
3250
- rocksdb_writebatch_delete(wb, "bar", 3);
3251
- rocksdb_transactiondb_write(txn_db, woptions, wb, &err);
3252
- rocksdb_writebatch_destroy(wb);
3253
- CheckTxnDBGet(txn_db, roptions, "box", "c");
3254
- CheckTxnDBPinGet(txn_db, roptions, "box", "c");
3255
- CheckNoError(err);
3256
-
3257
- // multi get
3258
- {
3259
- const char* keys[3] = {"box", "foo", "notfound"};
3260
- const size_t keys_sizes[3] = {3, 3, 8};
3261
- char* vals[3];
3262
- size_t vals_sizes[3];
3263
- char* errs[3];
3264
- const char* expected[3] = {"c", NULL, NULL};
3265
- rocksdb_transactiondb_multi_get(txn_db, roptions, 3, keys, keys_sizes,
3266
- vals, vals_sizes, errs);
3267
- CheckMultiGetValues(3, vals, vals_sizes, errs, expected);
3268
- }
3269
-
3270
- // begin a transaction
3271
- txn = rocksdb_transaction_begin(txn_db, woptions, txn_options, NULL);
3272
- // put
3273
- rocksdb_transaction_put(txn, "foo", 3, "hello", 5, &err);
3274
- CheckNoError(err);
3275
- CheckTxnGet(txn, roptions, "foo", "hello");
3276
- CheckTxnPinGet(txn, roptions, "foo", "hello");
3277
- {
3278
- const char* keys[3] = {"box", "foo", "notfound"};
3279
- const size_t keys_sizes[3] = {3, 3, 8};
3280
- char* vals[3];
3281
- size_t vals_sizes[3];
3282
- char* errs[3];
3283
- const char* expected[3] = {"c", "hello", NULL};
3284
- rocksdb_transaction_multi_get(txn, roptions, 3, keys, keys_sizes, vals,
3285
- vals_sizes, errs);
3286
- CheckMultiGetValues(3, vals, vals_sizes, errs, expected);
3287
- }
3288
- // delete
3289
- rocksdb_transaction_delete(txn, "foo", 3, &err);
3290
- CheckNoError(err);
3291
- CheckTxnGet(txn, roptions, "foo", NULL);
3292
- CheckTxnPinGet(txn, roptions, "foo", NULL);
3293
-
3294
- rocksdb_transaction_put(txn, "foo", 3, "hello", 5, &err);
3295
- CheckNoError(err);
3296
-
3297
- // read from outside transaction, before commit
3298
- CheckTxnDBGet(txn_db, roptions, "foo", NULL);
3299
- CheckTxnDBPinGet(txn_db, roptions, "foo", NULL);
3300
- {
3301
- const char* keys[3] = {"box", "foo", "notfound"};
3302
- const size_t keys_sizes[3] = {3, 3, 8};
3303
- char* vals[3];
3304
- size_t vals_sizes[3];
3305
- char* errs[3];
3306
- const char* expected[3] = {"c", NULL, NULL};
3307
- rocksdb_transactiondb_multi_get(txn_db, roptions, 3, keys, keys_sizes,
3308
- vals, vals_sizes, errs);
3309
- CheckMultiGetValues(3, vals, vals_sizes, errs, expected);
3310
- }
3311
-
3312
- // commit
3313
- rocksdb_transaction_commit(txn, &err);
3314
- CheckNoError(err);
3315
-
3316
- // read from outside transaction, after commit
3317
- CheckTxnDBGet(txn_db, roptions, "foo", "hello");
3318
- CheckTxnDBPinGet(txn_db, roptions, "foo", "hello");
3319
- {
3320
- const char* keys[3] = {"box", "foo", "notfound"};
3321
- const size_t keys_sizes[3] = {3, 3, 8};
3322
- char* vals[3];
3323
- size_t vals_sizes[3];
3324
- char* errs[3];
3325
- const char* expected[3] = {"c", "hello", NULL};
3326
- rocksdb_transactiondb_multi_get(txn_db, roptions, 3, keys, keys_sizes,
3327
- vals, vals_sizes, errs);
3328
- CheckMultiGetValues(3, vals, vals_sizes, errs, expected);
3329
- }
3330
-
3331
- // reuse old transaction
3332
- txn = rocksdb_transaction_begin(txn_db, woptions, txn_options, txn);
3333
-
3334
- // snapshot
3335
- const rocksdb_snapshot_t* snapshot;
3336
- snapshot = rocksdb_transactiondb_create_snapshot(txn_db);
3337
- rocksdb_readoptions_set_snapshot(roptions, snapshot);
3338
-
3339
- rocksdb_transactiondb_put(txn_db, woptions, "foo", 3, "hey", 3, &err);
3340
- CheckNoError(err);
3341
-
3342
- CheckTxnDBGet(txn_db, roptions, "foo", "hello");
3343
- CheckTxnDBPinGet(txn_db, roptions, "foo", "hello");
3344
- rocksdb_readoptions_set_snapshot(roptions, NULL);
3345
- rocksdb_transactiondb_release_snapshot(txn_db, snapshot);
3346
- CheckTxnDBGet(txn_db, roptions, "foo", "hey");
3347
- CheckTxnDBPinGet(txn_db, roptions, "foo", "hey");
3348
-
3349
- // iterate
3350
- rocksdb_transaction_put(txn, "bar", 3, "hi", 2, &err);
3351
- rocksdb_iterator_t* iter =
3352
- rocksdb_transaction_create_iterator(txn, roptions);
3353
- CheckCondition(!rocksdb_iter_valid(iter));
3354
- rocksdb_iter_seek_to_first(iter);
3355
- CheckCondition(rocksdb_iter_valid(iter));
3356
- CheckIter(iter, "bar", "hi");
3357
- rocksdb_iter_get_error(iter, &err);
3358
- CheckNoError(err);
3359
- rocksdb_iter_destroy(iter);
3360
-
3361
- // rollback
3362
- rocksdb_transaction_rollback(txn, &err);
3363
- CheckNoError(err);
3364
- CheckTxnDBGet(txn_db, roptions, "bar", NULL);
3365
- CheckTxnDBPinGet(txn_db, roptions, "bar", NULL);
3366
-
3367
- // save point
3368
- rocksdb_transaction_put(txn, "foo1", 4, "hi1", 3, &err);
3369
- rocksdb_transaction_set_savepoint(txn);
3370
- CheckTxnGet(txn, roptions, "foo1", "hi1");
3371
- CheckTxnPinGet(txn, roptions, "foo1", "hi1");
3372
- rocksdb_transaction_put(txn, "foo2", 4, "hi2", 3, &err);
3373
- CheckTxnGet(txn, roptions, "foo2", "hi2");
3374
- CheckTxnPinGet(txn, roptions, "foo2", "hi2");
3375
-
3376
- // rollback to savepoint
3377
- rocksdb_transaction_rollback_to_savepoint(txn, &err);
3378
- CheckNoError(err);
3379
- CheckTxnGet(txn, roptions, "foo2", NULL);
3380
- CheckTxnGet(txn, roptions, "foo1", "hi1");
3381
- CheckTxnPinGet(txn, roptions, "foo2", NULL);
3382
- CheckTxnPinGet(txn, roptions, "foo1", "hi1");
3383
- CheckTxnDBGet(txn_db, roptions, "foo1", NULL);
3384
- CheckTxnDBGet(txn_db, roptions, "foo2", NULL);
3385
- CheckTxnDBPinGet(txn_db, roptions, "foo1", NULL);
3386
- CheckTxnDBPinGet(txn_db, roptions, "foo2", NULL);
3387
- rocksdb_transaction_commit(txn, &err);
3388
- CheckNoError(err);
3389
- CheckTxnDBGet(txn_db, roptions, "foo1", "hi1");
3390
- CheckTxnDBGet(txn_db, roptions, "foo2", NULL);
3391
- CheckTxnDBPinGet(txn_db, roptions, "foo1", "hi1");
3392
- CheckTxnDBPinGet(txn_db, roptions, "foo2", NULL);
3393
-
3394
- // Column families.
3395
- rocksdb_column_family_handle_t* cfh;
3396
- cfh = rocksdb_transactiondb_create_column_family(txn_db, options,
3397
- "txn_db_cf", &err);
3398
- CheckNoError(err);
3399
-
3400
- rocksdb_transactiondb_put_cf(txn_db, woptions, cfh, "cf_foo", 6, "cf_hello",
3401
- 8, &err);
3402
- CheckNoError(err);
3403
- CheckTxnDBGetCF(txn_db, roptions, cfh, "cf_foo", "cf_hello");
3404
- CheckTxnDBPinGetCF(txn_db, roptions, cfh, "cf_foo", "cf_hello");
3405
- {
3406
- const rocksdb_column_family_handle_t* get_handles[2] = {cfh, cfh};
3407
- const char* keys[2] = {"cf_foo", "notfound"};
3408
- const size_t keys_sizes[2] = {6, 8};
3409
- char* vals[2];
3410
- size_t vals_sizes[2];
3411
- char* errs[2];
3412
- const char* expected[2] = {"cf_hello", NULL};
3413
- rocksdb_transactiondb_multi_get_cf(txn_db, roptions, get_handles, 2, keys,
3414
- keys_sizes, vals, vals_sizes, errs);
3415
- CheckMultiGetValues(2, vals, vals_sizes, errs, expected);
3416
- }
3417
-
3418
- rocksdb_transactiondb_delete_cf(txn_db, woptions, cfh, "cf_foo", 6, &err);
3419
- CheckNoError(err);
3420
- CheckTxnDBGetCF(txn_db, roptions, cfh, "cf_foo", NULL);
3421
- CheckTxnDBPinGetCF(txn_db, roptions, cfh, "cf_foo", NULL);
3422
-
3423
- // memory usage
3424
- rocksdb_t* base_db = rocksdb_transactiondb_get_base_db(txn_db);
3425
- rocksdb_memory_consumers_t* consumers = rocksdb_memory_consumers_create();
3426
- rocksdb_memory_consumers_add_db(consumers, base_db);
3427
- rocksdb_memory_usage_t* usage =
3428
- rocksdb_approximate_memory_usage_create(consumers, &err);
3429
- CheckNoError(err);
3430
- rocksdb_approximate_memory_usage_destroy(usage);
3431
- rocksdb_memory_consumers_destroy(consumers);
3432
- rocksdb_transactiondb_close_base_db(base_db);
3433
-
3434
- // flush
3435
- rocksdb_flushoptions_t* flush_options = rocksdb_flushoptions_create();
3436
- rocksdb_flushoptions_set_wait(flush_options, 1);
3437
- rocksdb_transactiondb_flush_wal(txn_db, 1, &err);
3438
- CheckNoError(err);
3439
- rocksdb_transactiondb_flush_cf(txn_db, flush_options, cfh, &err);
3440
- CheckNoError(err);
3441
- rocksdb_transactiondb_flush(txn_db, flush_options, &err);
3442
- CheckNoError(err);
3443
- rocksdb_flushoptions_destroy(flush_options);
3444
-
3445
- // close and destroy
3446
- rocksdb_column_family_handle_destroy(cfh);
3447
- rocksdb_transaction_destroy(txn);
3448
- rocksdb_transactiondb_close(txn_db);
3449
- rocksdb_destroy_db(options, dbname, &err);
3450
- CheckNoError(err);
3451
- rocksdb_transaction_options_destroy(txn_options);
3452
- rocksdb_transactiondb_options_destroy(txn_db_options);
3453
- }
3454
-
3455
- StartPhase("two-phase commit");
3456
- {
3457
- // open a TransactionDB
3458
- txn_db_options = rocksdb_transactiondb_options_create();
3459
- txn_options = rocksdb_transaction_options_create();
3460
- rocksdb_options_set_create_if_missing(options, 1);
3461
- txn_db = rocksdb_transactiondb_open(options, txn_db_options, dbname, &err);
3462
- CheckNoError(err);
3463
-
3464
- rocksdb_transaction_options_set_skip_prepare(txn_options, 0);
3465
- txn = rocksdb_transaction_begin(txn_db, woptions, txn_options, NULL);
3466
- rocksdb_transaction_commit(txn, &err);
3467
- CheckCondition(err != NULL);
3468
- Free(&err);
3469
- err = NULL;
3470
- rocksdb_transaction_prepare(txn, &err);
3471
- CheckCondition(err != NULL);
3472
- Free(&err);
3473
- err = NULL;
3474
- rocksdb_transaction_set_name(txn, "txn1", 4, &err);
3475
- CheckNoError(err);
3476
- rocksdb_transaction_prepare(txn, &err);
3477
- CheckNoError(err);
3478
- rocksdb_transaction_commit(txn, &err);
3479
- CheckNoError(err);
3480
- rocksdb_transaction_destroy(txn);
3481
-
3482
- // prepare 2 transactions and close db.
3483
- rocksdb_transaction_t* txn1 =
3484
- rocksdb_transaction_begin(txn_db, woptions, txn_options, NULL);
3485
- rocksdb_transaction_put(txn1, "bar1", 4, "1", 1, &err);
3486
- CheckNoError(err);
3487
- rocksdb_transaction_set_name(txn1, "txn1", 4, &err);
3488
- CheckNoError(err);
3489
- rocksdb_transaction_prepare(txn1, &err);
3490
- CheckNoError(err);
3491
- rocksdb_transaction_t* txn2 =
3492
- rocksdb_transaction_begin(txn_db, woptions, txn_options, NULL);
3493
- rocksdb_transaction_put(txn2, "bar2", 4, "2", 1, &err);
3494
- CheckNoError(err);
3495
- rocksdb_transaction_set_name(txn2, "txn2", 4, &err);
3496
- CheckNoError(err);
3497
- rocksdb_transaction_prepare(txn2, &err);
3498
- CheckNoError(err);
3499
- rocksdb_transaction_destroy(txn1);
3500
- rocksdb_transaction_destroy(txn2);
3501
- rocksdb_transactiondb_close(txn_db);
3502
- rocksdb_transaction_options_destroy(txn_options);
3503
- rocksdb_transactiondb_options_destroy(txn_db_options);
3504
-
3505
- // reopen db and get all prepared.
3506
- txn_db_options = rocksdb_transactiondb_options_create();
3507
- txn_options = rocksdb_transaction_options_create();
3508
- rocksdb_options_set_error_if_exists(options, 0);
3509
- txn_db = rocksdb_transactiondb_open(options, txn_db_options, dbname, &err);
3510
- CheckNoError(err);
3511
- CheckTxnDBPinGet(txn_db, roptions, "bar1", NULL);
3512
- CheckTxnDBPinGet(txn_db, roptions, "bar2", NULL);
3513
- size_t cnt;
3514
- rocksdb_transaction_t** txns =
3515
- rocksdb_transactiondb_get_prepared_transactions(txn_db, &cnt);
3516
- CheckCondition(cnt == 2);
3517
- size_t i;
3518
- for (i = 0; i < cnt; i++) {
3519
- txn = txns[i];
3520
- size_t name_len = 0;
3521
- char* name = rocksdb_transaction_get_name(txn, &name_len);
3522
- CheckCondition(name_len == 4);
3523
- if (strncmp(name, "txn1", name_len) == 0) {
3524
- rocksdb_transaction_commit(txn, &err);
3525
- } else if (strncmp(name, "txn2", name_len) == 0) {
3526
- rocksdb_transaction_rollback(txn, &err);
3527
- }
3528
- rocksdb_free(name);
3529
- CheckNoError(err);
3530
- rocksdb_transaction_destroy(txn);
3531
- }
3532
- rocksdb_free(txns);
3533
- CheckTxnDBGet(txn_db, roptions, "bar1", "1");
3534
- CheckTxnDBGet(txn_db, roptions, "bar2", NULL);
3535
- rocksdb_transactiondb_put(txn_db, woptions, "bar2", 4, "2", 1, &err);
3536
- CheckNoError(err);
3537
-
3538
- // close and destroy
3539
- rocksdb_transactiondb_close(txn_db);
3540
- rocksdb_destroy_db(options, dbname, &err);
3541
- CheckNoError(err);
3542
- rocksdb_transaction_options_destroy(txn_options);
3543
- rocksdb_transactiondb_options_destroy(txn_db_options);
3544
- }
3545
-
3546
- StartPhase("transactions_multi_get_for_update");
3547
- {
3548
- // open a TransactionDB
3549
- txn_db_options = rocksdb_transactiondb_options_create();
3550
- rocksdb_transactiondb_options_set_transaction_lock_timeout(txn_db_options,
3551
- 0);
3552
- txn_options = rocksdb_transaction_options_create();
3553
- rocksdb_options_set_create_if_missing(options, 1);
3554
- txn_db = rocksdb_transactiondb_open(options, txn_db_options, dbname, &err);
3555
- CheckNoError(err);
3556
-
3557
- rocksdb_transactiondb_put(txn_db, woptions, "foo", 3, "hey", 3, &err);
3558
- CheckNoError(err);
3559
- rocksdb_transactiondb_put(txn_db, woptions, "bar", 3, "hello", 5, &err);
3560
- CheckNoError(err);
3561
-
3562
- // begin transactions
3563
- txn = rocksdb_transaction_begin(txn_db, woptions, txn_options, NULL);
3564
- rocksdb_transaction_t* txn2 =
3565
- rocksdb_transaction_begin(txn_db, woptions, txn_options, NULL);
3566
-
3567
- // multi get
3568
- {
3569
- const char* keys[2] = {"foo", "bar"};
3570
- const size_t keys_sizes[2] = {3, 3};
3571
- char* vals[2];
3572
- size_t vals_sizes[2];
3573
- char* errs[2];
3574
- const char* expected[2] = {"hey", "hello"};
3575
- rocksdb_transaction_multi_get_for_update(
3576
- txn, roptions, 2, keys, keys_sizes, vals, vals_sizes, errs);
3577
- CheckMultiGetValues(2, vals, vals_sizes, errs, expected);
3578
- }
3579
-
3580
- char* conflict_err = NULL;
3581
- size_t val_len;
3582
- rocksdb_transaction_get_for_update(txn2, roptions, "foo", 3, &val_len, true,
3583
- &conflict_err);
3584
- // get-for-update conflict
3585
- CheckCondition(conflict_err != NULL);
3586
- Free(&conflict_err);
3587
-
3588
- // commit
3589
- rocksdb_transaction_commit(txn, &err);
3590
- CheckNoError(err);
3591
-
3592
- // should work after first tx is commited
3593
- CheckTxnGetForUpdate(txn2, roptions, "foo", "hey");
3594
-
3595
- // commit the second one
3596
- rocksdb_transaction_commit(txn2, &err);
3597
- CheckNoError(err);
3598
-
3599
- // destroy txns
3600
- rocksdb_transaction_destroy(txn);
3601
- rocksdb_transaction_destroy(txn2);
3602
-
3603
- // same for column families
3604
-
3605
- rocksdb_column_family_handle_t* cfh;
3606
- cfh = rocksdb_transactiondb_create_column_family(txn_db, options,
3607
- "txn_db_cf", &err);
3608
- CheckNoError(err);
3609
-
3610
- rocksdb_transactiondb_put_cf(txn_db, woptions, cfh, "cf_foo", 6, "cf_hello",
3611
- 8, &err);
3612
- CheckNoError(err);
3613
- rocksdb_transactiondb_put_cf(txn_db, woptions, cfh, "cf_bar", 6, "cf_hey",
3614
- 6, &err);
3615
- CheckNoError(err);
3616
-
3617
- txn = rocksdb_transaction_begin(txn_db, woptions, txn_options, NULL);
3618
- txn2 = rocksdb_transaction_begin(txn_db, woptions, txn_options, NULL);
3619
-
3620
- {
3621
- const rocksdb_column_family_handle_t* get_handles[2] = {cfh, cfh};
3622
- const char* keys[2] = {"cf_foo", "cf_bar"};
3623
- const size_t keys_sizes[2] = {6, 6};
3624
- char* vals[2];
3625
- size_t vals_sizes[2];
3626
- char* errs[2];
3627
- const char* expected[2] = {"cf_hello", "cf_hey"};
3628
- rocksdb_transaction_multi_get_for_update_cf(txn, roptions, get_handles, 2,
3629
- keys, keys_sizes, vals,
3630
- vals_sizes, errs);
3631
- CheckMultiGetValues(2, vals, vals_sizes, errs, expected);
3632
- }
3633
-
3634
- char* conflict_err_cf = NULL;
3635
- size_t val_len_cf;
3636
- rocksdb_transaction_get_for_update_cf(txn2, roptions, cfh, "cf_foo", 6,
3637
- &val_len_cf, true, &conflict_err_cf);
3638
- CheckCondition(conflict_err_cf != NULL);
3639
- Free(&conflict_err_cf);
3640
-
3641
- rocksdb_transaction_commit(txn, &err);
3642
- CheckNoError(err);
3643
-
3644
- CheckTxnGetForUpdateCF(txn2, roptions, cfh, "cf_foo", "cf_hello");
3645
-
3646
- rocksdb_transaction_commit(txn2, &err);
3647
- CheckNoError(err);
3648
-
3649
- // close and destroy
3650
- rocksdb_column_family_handle_destroy(cfh);
3651
- rocksdb_transaction_destroy(txn);
3652
- rocksdb_transaction_destroy(txn2);
3653
- rocksdb_transactiondb_close(txn_db);
3654
- rocksdb_destroy_db(options, dbname, &err);
3655
- CheckNoError(err);
3656
- rocksdb_transaction_options_destroy(txn_options);
3657
- rocksdb_transactiondb_options_destroy(txn_db_options);
3658
- }
3659
-
3660
- StartPhase("optimistic_transactions");
3661
- {
3662
- rocksdb_options_t* db_options = rocksdb_options_create();
3663
- rocksdb_options_set_create_if_missing(db_options, 1);
3664
- rocksdb_options_set_allow_concurrent_memtable_write(db_options, 1);
3665
- otxn_db = rocksdb_optimistictransactiondb_open(db_options, dbname, &err);
3666
- otxn_options = rocksdb_optimistictransaction_options_create();
3667
- rocksdb_transaction_t* txn1 = rocksdb_optimistictransaction_begin(
3668
- otxn_db, woptions, otxn_options, NULL);
3669
- rocksdb_transaction_t* txn2 = rocksdb_optimistictransaction_begin(
3670
- otxn_db, woptions, otxn_options, NULL);
3671
- rocksdb_transaction_put(txn1, "key", 3, "value", 5, &err);
3672
- CheckNoError(err);
3673
- rocksdb_transaction_put(txn2, "key1", 4, "value1", 6, &err);
3674
- CheckNoError(err);
3675
- CheckTxnGet(txn1, roptions, "key", "value");
3676
- CheckTxnPinGet(txn1, roptions, "key", "value");
3677
- rocksdb_transaction_commit(txn1, &err);
3678
- CheckNoError(err);
3679
- rocksdb_transaction_commit(txn2, &err);
3680
- CheckNoError(err);
3681
- rocksdb_transaction_destroy(txn1);
3682
- rocksdb_transaction_destroy(txn2);
3683
-
3684
- // Check column family
3685
- db = rocksdb_optimistictransactiondb_get_base_db(otxn_db);
3686
- rocksdb_put(db, woptions, "key", 3, "value", 5, &err);
3687
- CheckNoError(err);
3688
- rocksdb_column_family_handle_t *cfh1, *cfh2;
3689
- char** list_const_cf_names = (char**)malloc(2 * sizeof(char*));
3690
- list_const_cf_names[0] = "txn_db_cf1";
3691
- list_const_cf_names[1] = "txn_db_cf2";
3692
- size_t cflen;
3693
- rocksdb_column_family_handle_t** list_cfh = rocksdb_create_column_families(
3694
- db, db_options, 2, (const char* const*)list_const_cf_names, &cflen,
3695
- &err);
3696
- free(list_const_cf_names);
3697
- CheckNoError(err);
3698
- assert(cflen == 2);
3699
- cfh1 = list_cfh[0];
3700
- cfh2 = list_cfh[1];
3701
- rocksdb_create_column_families_destroy(list_cfh);
3702
- txn = rocksdb_optimistictransaction_begin(otxn_db, woptions, otxn_options,
3703
- NULL);
3704
- rocksdb_transaction_put_cf(txn, cfh1, "key_cf1", 7, "val_cf1", 7, &err);
3705
- CheckNoError(err);
3706
- rocksdb_transaction_put_cf(txn, cfh2, "key_cf2", 7, "val_cf2", 7, &err);
3707
- CheckNoError(err);
3708
- rocksdb_transaction_commit(txn, &err);
3709
- CheckNoError(err);
3710
- txn = rocksdb_optimistictransaction_begin(otxn_db, woptions, otxn_options,
3711
- txn);
3712
- CheckGetCF(db, roptions, cfh1, "key_cf1", "val_cf1");
3713
- CheckTxnGetCF(txn, roptions, cfh1, "key_cf1", "val_cf1");
3714
- CheckTxnPinGetCF(txn, roptions, cfh1, "key_cf1", "val_cf1");
3715
- {
3716
- const rocksdb_column_family_handle_t* get_handles[3] = {cfh1, cfh2, cfh2};
3717
- const char* keys[3] = {"key_cf1", "key_cf2", "notfound"};
3718
- const size_t keys_sizes[3] = {7, 7, 8};
3719
- char* vals[3];
3720
- size_t vals_sizes[3];
3721
- char* errs[3];
3722
- const char* expected[3] = {"val_cf1", "val_cf2", NULL};
3723
- rocksdb_transaction_multi_get_cf(txn, roptions, get_handles, 3, keys,
3724
- keys_sizes, vals, vals_sizes, errs);
3725
- CheckMultiGetValues(3, vals, vals_sizes, errs, expected);
3726
- }
3727
-
3728
- // Check iterator with column family
3729
- rocksdb_transaction_put_cf(txn, cfh1, "key1_cf", 7, "val1_cf", 7, &err);
3730
- CheckNoError(err);
3731
- rocksdb_iterator_t* iter =
3732
- rocksdb_transaction_create_iterator_cf(txn, roptions, cfh1);
3733
- CheckCondition(!rocksdb_iter_valid(iter));
3734
- rocksdb_iter_seek_to_first(iter);
3735
- CheckCondition(rocksdb_iter_valid(iter));
3736
- CheckIter(iter, "key1_cf", "val1_cf");
3737
- rocksdb_iter_get_error(iter, &err);
3738
- CheckNoError(err);
3739
- rocksdb_iter_destroy(iter);
3740
-
3741
- rocksdb_transaction_destroy(txn);
3742
- rocksdb_column_family_handle_destroy(cfh1);
3743
- rocksdb_column_family_handle_destroy(cfh2);
3744
- rocksdb_optimistictransactiondb_close_base_db(db);
3745
- rocksdb_optimistictransactiondb_close(otxn_db);
3746
-
3747
- // Check open optimistic transaction db with column families
3748
- size_t cf_len;
3749
- char** column_fams =
3750
- rocksdb_list_column_families(db_options, dbname, &cf_len, &err);
3751
- CheckNoError(err);
3752
- CheckEqual("default", column_fams[0], 7);
3753
- CheckEqual("txn_db_cf1", column_fams[1], 10);
3754
- CheckEqual("txn_db_cf2", column_fams[2], 10);
3755
- CheckCondition(cf_len == 3);
3756
- rocksdb_list_column_families_destroy(column_fams, cf_len);
3757
-
3758
- const char* cf_names[3] = {"default", "txn_db_cf1", "txn_db_cf2"};
3759
- rocksdb_options_t* cf_options = rocksdb_options_create();
3760
- const rocksdb_options_t* cf_opts[3] = {cf_options, cf_options, cf_options};
3761
-
3762
- rocksdb_options_set_error_if_exists(cf_options, 0);
3763
- rocksdb_column_family_handle_t* cf_handles[3];
3764
- otxn_db = rocksdb_optimistictransactiondb_open_column_families(
3765
- db_options, dbname, 3, cf_names, cf_opts, cf_handles, &err);
3766
- CheckNoError(err);
3767
- rocksdb_transaction_t* txn_cf = rocksdb_optimistictransaction_begin(
3768
- otxn_db, woptions, otxn_options, NULL);
3769
- CheckTxnGetCF(txn_cf, roptions, cf_handles[0], "key", "value");
3770
- CheckTxnGetCF(txn_cf, roptions, cf_handles[1], "key_cf1", "val_cf1");
3771
- CheckTxnGetCF(txn_cf, roptions, cf_handles[2], "key_cf2", "val_cf2");
3772
- CheckTxnPinGetCF(txn_cf, roptions, cf_handles[0], "key", "value");
3773
- CheckTxnPinGetCF(txn_cf, roptions, cf_handles[1], "key_cf1", "val_cf1");
3774
- CheckTxnPinGetCF(txn_cf, roptions, cf_handles[2], "key_cf2", "val_cf2");
3775
- rocksdb_transaction_destroy(txn_cf);
3776
- rocksdb_options_destroy(cf_options);
3777
- rocksdb_column_family_handle_destroy(cf_handles[0]);
3778
- rocksdb_column_family_handle_destroy(cf_handles[1]);
3779
- rocksdb_column_family_handle_destroy(cf_handles[2]);
3780
- rocksdb_optimistictransactiondb_close(otxn_db);
3781
- rocksdb_destroy_db(db_options, dbname, &err);
3782
- rocksdb_options_destroy(db_options);
3783
- rocksdb_optimistictransaction_options_destroy(otxn_options);
3784
- CheckNoError(err);
3785
- }
3786
-
3787
- // Simple sanity check that setting memtable rep works.
3788
- StartPhase("memtable_reps");
3789
- {
3790
- // Create database with vector memtable.
3791
- rocksdb_options_set_memtable_vector_rep(options);
3792
- db = rocksdb_open(options, dbname, &err);
3793
- CheckNoError(err);
3794
-
3795
- // Create database with hash skiplist memtable.
3796
- rocksdb_close(db);
3797
- rocksdb_destroy_db(options, dbname, &err);
3798
- CheckNoError(err);
3799
-
3800
- rocksdb_options_set_hash_skip_list_rep(options, 5000, 4, 4);
3801
- db = rocksdb_open(options, dbname, &err);
3802
- CheckNoError(err);
3803
- }
3804
-
3805
- // Check that secondary instance works.
3806
- StartPhase("open_as_secondary");
3807
- {
3808
- rocksdb_close(db);
3809
- rocksdb_destroy_db(options, dbname, &err);
3810
-
3811
- rocksdb_options_t* db_options = rocksdb_options_create();
3812
- rocksdb_options_set_create_if_missing(db_options, 1);
3813
- db = rocksdb_open(db_options, dbname, &err);
3814
- CheckNoError(err);
3815
- rocksdb_t* db1;
3816
- rocksdb_options_t* opts = rocksdb_options_create();
3817
- rocksdb_options_set_max_open_files(opts, -1);
3818
- rocksdb_options_set_create_if_missing(opts, 1);
3819
- snprintf(secondary_path, sizeof(secondary_path),
3820
- "%s/rocksdb_c_test_secondary-%d", GetTempDir(), ((int)geteuid()));
3821
- db1 = rocksdb_open_as_secondary(opts, dbname, secondary_path, &err);
3822
- CheckNoError(err);
3823
-
3824
- rocksdb_writeoptions_set_sync(woptions, 0);
3825
- rocksdb_writeoptions_disable_WAL(woptions, 1);
3826
- rocksdb_put(db, woptions, "key0", 4, "value0", 6, &err);
3827
- CheckNoError(err);
3828
- rocksdb_flushoptions_t* flush_opts = rocksdb_flushoptions_create();
3829
- rocksdb_flushoptions_set_wait(flush_opts, 1);
3830
- rocksdb_flush(db, flush_opts, &err);
3831
- CheckNoError(err);
3832
- rocksdb_try_catch_up_with_primary(db1, &err);
3833
- CheckNoError(err);
3834
- rocksdb_readoptions_t* ropts = rocksdb_readoptions_create();
3835
- rocksdb_readoptions_set_verify_checksums(ropts, 1);
3836
- rocksdb_readoptions_set_snapshot(ropts, NULL);
3837
- CheckGet(db, ropts, "key0", "value0");
3838
- CheckGet(db1, ropts, "key0", "value0");
3839
-
3840
- rocksdb_writeoptions_disable_WAL(woptions, 0);
3841
- rocksdb_put(db, woptions, "key1", 4, "value1", 6, &err);
3842
- CheckNoError(err);
3843
- rocksdb_try_catch_up_with_primary(db1, &err);
3844
- CheckNoError(err);
3845
- CheckGet(db1, ropts, "key0", "value0");
3846
- CheckGet(db1, ropts, "key1", "value1");
3847
-
3848
- rocksdb_close(db1);
3849
- rocksdb_destroy_db(opts, secondary_path, &err);
3850
- CheckNoError(err);
3851
-
3852
- rocksdb_options_destroy(db_options);
3853
- rocksdb_options_destroy(opts);
3854
- rocksdb_readoptions_destroy(ropts);
3855
- rocksdb_flushoptions_destroy(flush_opts);
3856
- }
3857
-
3858
- // Simple sanity check that options setting db_paths work.
3859
- StartPhase("open_db_paths");
3860
- {
3861
- rocksdb_close(db);
3862
- rocksdb_destroy_db(options, dbname, &err);
3863
-
3864
- const rocksdb_dbpath_t* paths[1] = {dbpath};
3865
- rocksdb_options_set_db_paths(options, paths, 1);
3866
- db = rocksdb_open(options, dbname, &err);
3867
- CheckNoError(err);
3868
- }
3869
-
3870
- StartPhase("filter_with_prefix_seek");
3871
- {
3872
- rocksdb_close(db);
3873
- rocksdb_destroy_db(options, dbname, &err);
3874
- CheckNoError(err);
3875
-
3876
- rocksdb_options_set_prefix_extractor(
3877
- options, rocksdb_slicetransform_create_fixed_prefix(1));
3878
- rocksdb_filterpolicy_t* filter_policy =
3879
- rocksdb_filterpolicy_create_bloom_full(8.0);
3880
- rocksdb_block_based_options_set_filter_policy(table_options, filter_policy);
3881
- rocksdb_options_set_block_based_table_factory(options, table_options);
3882
-
3883
- db = rocksdb_open(options, dbname, &err);
3884
- CheckNoError(err);
3885
-
3886
- int i;
3887
- for (i = 0; i < 10; ++i) {
3888
- char key = '0' + (char)i;
3889
- rocksdb_put(db, woptions, &key, 1, "", 1, &err);
3890
- CheckNoError(err);
3891
- }
3892
-
3893
- // Flush to generate an L0 so that filter will be used later.
3894
- rocksdb_flushoptions_t* flush_options = rocksdb_flushoptions_create();
3895
- rocksdb_flushoptions_set_wait(flush_options, 1);
3896
- rocksdb_flush(db, flush_options, &err);
3897
- rocksdb_flushoptions_destroy(flush_options);
3898
- CheckNoError(err);
3899
-
3900
- rocksdb_readoptions_t* ropts = rocksdb_readoptions_create();
3901
- rocksdb_iterator_t* iter = rocksdb_create_iterator(db, ropts);
3902
-
3903
- rocksdb_iter_seek(iter, "0", 1);
3904
- int cnt = 0;
3905
- while (rocksdb_iter_valid(iter)) {
3906
- ++cnt;
3907
- rocksdb_iter_next(iter);
3908
- }
3909
- CheckCondition(10 == cnt);
3910
-
3911
- rocksdb_iter_destroy(iter);
3912
- rocksdb_readoptions_destroy(ropts);
3913
- }
3914
-
3915
- StartPhase("statistics");
3916
- {
3917
- const uint32_t BYTES_WRITTEN_TICKER = 60;
3918
- const uint32_t DB_WRITE_HIST = 1;
3919
-
3920
- rocksdb_statistics_histogram_data_t* hist =
3921
- rocksdb_statistics_histogram_data_create();
3922
- {
3923
- // zero by default
3924
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_median(hist));
3925
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_p95(hist));
3926
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_p99(hist));
3927
- CheckCondition(0.0 ==
3928
- rocksdb_statistics_histogram_data_get_average(hist));
3929
- CheckCondition(0.0 ==
3930
- rocksdb_statistics_histogram_data_get_std_dev(hist));
3931
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_max(hist));
3932
- CheckCondition(0 == rocksdb_statistics_histogram_data_get_count(hist));
3933
- CheckCondition(0 == rocksdb_statistics_histogram_data_get_sum(hist));
3934
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_min(hist));
3935
- }
3936
-
3937
- rocksdb_close(db);
3938
- rocksdb_destroy_db(options, dbname, &err);
3939
- CheckNoError(err);
3940
-
3941
- rocksdb_options_enable_statistics(options);
3942
- rocksdb_options_set_statistics_level(options, rocksdb_statistics_level_all);
3943
-
3944
- db = rocksdb_open(options, dbname, &err);
3945
- CheckNoError(err);
3946
-
3947
- CheckCondition(0 == rocksdb_options_statistics_get_ticker_count(
3948
- options, BYTES_WRITTEN_TICKER));
3949
- rocksdb_options_statistics_get_histogram_data(options, DB_WRITE_HIST, hist);
3950
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_median(hist));
3951
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_p95(hist));
3952
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_p99(hist));
3953
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_average(hist));
3954
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_std_dev(hist));
3955
- CheckCondition(0.0 == rocksdb_statistics_histogram_data_get_max(hist));
3956
- CheckCondition(0 == rocksdb_statistics_histogram_data_get_count(hist));
3957
- CheckCondition(0 == rocksdb_statistics_histogram_data_get_sum(hist));
3958
-
3959
- int i;
3960
- for (i = 0; i < 10; ++i) {
3961
- char key = '0' + (char)i;
3962
- rocksdb_put(db, woptions, &key, 1, "", 1, &err);
3963
- CheckNoError(err);
3964
- }
3965
- CheckCondition(0 != rocksdb_options_statistics_get_ticker_count(
3966
- options, BYTES_WRITTEN_TICKER));
3967
- rocksdb_options_statistics_get_histogram_data(options, DB_WRITE_HIST, hist);
3968
- CheckCondition(0.0 != rocksdb_statistics_histogram_data_get_median(hist));
3969
- CheckCondition(0.0 != rocksdb_statistics_histogram_data_get_p95(hist));
3970
- CheckCondition(0.0 != rocksdb_statistics_histogram_data_get_p99(hist));
3971
- CheckCondition(0.0 != rocksdb_statistics_histogram_data_get_average(hist));
3972
- CheckCondition(0.0 != rocksdb_statistics_histogram_data_get_std_dev(hist));
3973
- CheckCondition(0.0 != rocksdb_statistics_histogram_data_get_max(hist));
3974
- CheckCondition(0 != rocksdb_statistics_histogram_data_get_count(hist));
3975
- CheckCondition(0 != rocksdb_statistics_histogram_data_get_sum(hist));
3976
-
3977
- rocksdb_statistics_histogram_data_destroy(hist);
3978
- }
3979
-
3980
- StartPhase("wait_for_compact_options");
3981
- {
3982
- rocksdb_wait_for_compact_options_t* wco;
3983
- wco = rocksdb_wait_for_compact_options_create();
3984
-
3985
- rocksdb_wait_for_compact_options_set_abort_on_pause(wco, 1);
3986
- CheckCondition(1 ==
3987
- rocksdb_wait_for_compact_options_get_abort_on_pause(wco));
3988
-
3989
- rocksdb_wait_for_compact_options_set_flush(wco, 1);
3990
- CheckCondition(1 == rocksdb_wait_for_compact_options_get_flush(wco));
3991
-
3992
- rocksdb_wait_for_compact_options_set_close_db(wco, 1);
3993
- CheckCondition(1 == rocksdb_wait_for_compact_options_get_close_db(wco));
3994
-
3995
- rocksdb_wait_for_compact_options_set_timeout(wco, 342);
3996
- CheckCondition(342 == rocksdb_wait_for_compact_options_get_timeout(wco));
3997
-
3998
- rocksdb_wait_for_compact_options_destroy(wco);
3999
- }
4000
- StartPhase("wait_for_compact");
4001
- {
4002
- rocksdb_wait_for_compact_options_t* wco;
4003
- wco = rocksdb_wait_for_compact_options_create();
4004
- rocksdb_wait_for_compact_options_set_flush(wco, 1);
4005
-
4006
- rocksdb_wait_for_compact(db, wco, &err);
4007
- CheckNoError(err);
4008
- rocksdb_wait_for_compact_options_destroy(wco);
4009
- }
4010
-
4011
- StartPhase("write_buffer_manager");
4012
- {
4013
- rocksdb_cache_t* lru;
4014
- lru = rocksdb_cache_create_lru(100);
4015
-
4016
- rocksdb_write_buffer_manager_t* write_buffer_manager;
4017
- write_buffer_manager =
4018
- rocksdb_write_buffer_manager_create_with_cache(200, lru, false);
4019
-
4020
- CheckCondition(true ==
4021
- rocksdb_write_buffer_manager_enabled(write_buffer_manager));
4022
- CheckCondition(true == rocksdb_write_buffer_manager_cost_to_cache(
4023
- write_buffer_manager));
4024
- CheckCondition(
4025
- 200 == rocksdb_write_buffer_manager_buffer_size(write_buffer_manager));
4026
-
4027
- rocksdb_write_buffer_manager_set_buffer_size(write_buffer_manager, 300);
4028
- CheckCondition(
4029
- 300 == rocksdb_write_buffer_manager_buffer_size(write_buffer_manager));
4030
-
4031
- rocksdb_write_buffer_manager_destroy(write_buffer_manager);
4032
- rocksdb_cache_destroy(lru);
4033
- }
4034
-
4035
- StartPhase("cancel_all_background_work");
4036
- rocksdb_cancel_all_background_work(db, 1);
4037
-
4038
- StartPhase("cleanup");
4039
- rocksdb_close(db);
4040
- rocksdb_options_destroy(options);
4041
- rocksdb_block_based_options_destroy(table_options);
4042
- rocksdb_readoptions_destroy(roptions);
4043
- rocksdb_writeoptions_destroy(woptions);
4044
- rocksdb_compactoptions_destroy(coptions);
4045
- rocksdb_cache_destroy(cache);
4046
- rocksdb_comparator_destroy(cmp);
4047
- rocksdb_dbpath_destroy(dbpath);
4048
- rocksdb_env_destroy(env);
4049
-
4050
- fprintf(stderr, "PASS\n");
4051
- return 0;
4052
- }