From 34d3cb6dfd51374ce3b92b0377270f56ab835b89 Mon Sep 17 00:00:00 2001 From: Warrick <1016weicheng@gmail.com> Date: Fri, 10 Apr 2026 14:40:50 +0800 Subject: [PATCH 1/2] [fix] collect blob files size in rocksUsedDbSize --- src/ctrip_swap_rocks.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; From 07cad31ff3579587eb696a0d4090fb2ca00e892b Mon Sep 17 00:00:00 2001 From: Warrick <1016weicheng@gmail.com> Date: Fri, 10 Apr 2026 16:10:31 +0800 Subject: [PATCH 2/2] [fix] tests/gtid/xsync.tcl --- tests/gtid/xsync.tcl | 1 + 1 file changed, 1 insertion(+) 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 }