diff --git a/src/ctrip_swap_rocks.c b/src/ctrip_swap_rocks.c index 3ea418f8054..9c3f7e711c2 100644 --- a/src/ctrip_swap_rocks.c +++ b/src/ctrip_swap_rocks.c @@ -962,6 +962,14 @@ static uint64_t rocksUsedDbSize(rocks *rocks) { continue; } total_used_db_size += used_db_size; + + /* Also include blob file size for this CF, which is not + * accounted for by rocksdb_approximate_sizes_cf. */ + uint64_t blob_size = 0; + if (!rocksdb_property_int_cf(rocks->db, handle, + "rocksdb.total-blob-file-size", &blob_size)) { + total_used_db_size += blob_size; + } } return total_used_db_size; diff --git a/tests/gtid/xsync.tcl b/tests/gtid/xsync.tcl index 34d07fff4db..64174addfa1 100644 --- a/tests/gtid/xsync.tcl +++ b/tests/gtid/xsync.tcl @@ -39,6 +39,7 @@ start_server {tags {"xsync"} overrides {gtid-enabled yes}} { $M set hello world_1 wait_for_sync $S + wait_for_gtid_sync $M $S assert_equal [$S get hello] world_1 }