@@ -416,14 +416,13 @@ pub struct crocksdb_writestallinfo_t {
416
416
}
417
417
#[ repr( C ) ]
418
418
#[ derive( Debug , Copy , Clone ) ]
419
- pub struct crocksdb_writestallcondition_t {
420
- _unused : [ u8 ; 0 ] ,
421
- }
422
- #[ repr( C ) ]
423
- #[ derive( Debug , Copy , Clone ) ]
424
419
pub struct crocksdb_map_property_t {
425
420
_unused : [ u8 ; 0 ] ,
426
421
}
422
+ pub const crocksdb_writestallcondition_t_Normal: crocksdb_writestallcondition_t = 0 ;
423
+ pub const crocksdb_writestallcondition_t_Delayed: crocksdb_writestallcondition_t = 1 ;
424
+ pub const crocksdb_writestallcondition_t_Stopped: crocksdb_writestallcondition_t = 2 ;
425
+ pub type crocksdb_writestallcondition_t = u32 ;
427
426
pub const crocksdb_table_property_t_kDataSize: crocksdb_table_property_t = 1 ;
428
427
pub const crocksdb_table_property_t_kIndexSize: crocksdb_table_property_t = 2 ;
429
428
pub const crocksdb_table_property_t_kFilterSize: crocksdb_table_property_t = 3 ;
@@ -451,6 +450,23 @@ pub const crocksdb_backgrounderrorreason_t_kCompaction: crocksdb_backgrounderror
451
450
pub const crocksdb_backgrounderrorreason_t_kWriteCallback: crocksdb_backgrounderrorreason_t = 3 ;
452
451
pub const crocksdb_backgrounderrorreason_t_kMemTable: crocksdb_backgrounderrorreason_t = 4 ;
453
452
pub type crocksdb_backgrounderrorreason_t = u32 ;
453
+ pub const crocksdb_compaction_reason_t_Unknown: crocksdb_compaction_reason_t = 0 ;
454
+ pub const crocksdb_compaction_reason_t_LevelL0FilesNum: crocksdb_compaction_reason_t = 1 ;
455
+ pub const crocksdb_compaction_reason_t_LevelMaxLevelSize: crocksdb_compaction_reason_t = 2 ;
456
+ pub const crocksdb_compaction_reason_t_UniversalSizeAmplification: crocksdb_compaction_reason_t = 3 ;
457
+ pub const crocksdb_compaction_reason_t_UniversalSizeRatio: crocksdb_compaction_reason_t = 4 ;
458
+ pub const crocksdb_compaction_reason_t_UniversalSortedRunNum: crocksdb_compaction_reason_t = 5 ;
459
+ pub const crocksdb_compaction_reason_t_FIFOMaxSize: crocksdb_compaction_reason_t = 6 ;
460
+ pub const crocksdb_compaction_reason_t_FIFOReduceNumFiles: crocksdb_compaction_reason_t = 7 ;
461
+ pub const crocksdb_compaction_reason_t_FIFOTtl: crocksdb_compaction_reason_t = 8 ;
462
+ pub const crocksdb_compaction_reason_t_ManualCompaction: crocksdb_compaction_reason_t = 9 ;
463
+ pub const crocksdb_compaction_reason_t_FilesMarkedForCompaction: crocksdb_compaction_reason_t = 10 ;
464
+ pub const crocksdb_compaction_reason_t_BottommostFiles: crocksdb_compaction_reason_t = 11 ;
465
+ pub const crocksdb_compaction_reason_t_Ttl: crocksdb_compaction_reason_t = 12 ;
466
+ pub const crocksdb_compaction_reason_t_Flush: crocksdb_compaction_reason_t = 13 ;
467
+ pub const crocksdb_compaction_reason_t_ExternalSstIngestion: crocksdb_compaction_reason_t = 14 ;
468
+ pub const crocksdb_compaction_reason_t_NumOfReasons: crocksdb_compaction_reason_t = 15 ;
469
+ pub type crocksdb_compaction_reason_t = u32 ;
454
470
extern "C" {
455
471
pub fn crocksdb_open (
456
472
options : * const crocksdb_options_t ,
@@ -1558,6 +1574,11 @@ extern "C" {
1558
1574
info : * const crocksdb_compactionjobinfo_t ,
1559
1575
) -> u64 ;
1560
1576
}
1577
+ extern "C" {
1578
+ pub fn crocksdb_compactionjobinfo_compaction_reason (
1579
+ info : * const crocksdb_compactionjobinfo_t ,
1580
+ ) -> * const crocksdb_compaction_reason_t ;
1581
+ }
1561
1582
extern "C" {
1562
1583
pub fn crocksdb_externalfileingestioninfo_cf_name (
1563
1584
arg1 : * const crocksdb_externalfileingestioninfo_t ,
0 commit comments