diff --git a/src/paimon/core/realtime/arrow_deduplicate_realtime_store.cpp b/src/paimon/core/realtime/arrow_deduplicate_realtime_store.cpp index 9d44f8e6c..a19368157 100644 --- a/src/paimon/core/realtime/arrow_deduplicate_realtime_store.cpp +++ b/src/paimon/core/realtime/arrow_deduplicate_realtime_store.cpp @@ -283,7 +283,7 @@ ArrowDeduplicateRealtimeStore::AcquireKeyOffsetLookup() { } Status ArrowDeduplicateRealtimeStore::EnsureMutableDeletionBitmap() { - if (!pending_offset_deletions_.unique()) { + if (pending_offset_deletions_.use_count() != 1) { pending_offset_deletions_ = std::make_shared(*pending_offset_deletions_); } return Status::OK(); diff --git a/src/paimon/core/realtime/realtime_key_offset_index.cpp b/src/paimon/core/realtime/realtime_key_offset_index.cpp index c57a41fd0..1a4a347b4 100644 --- a/src/paimon/core/realtime/realtime_key_offset_index.cpp +++ b/src/paimon/core/realtime/realtime_key_offset_index.cpp @@ -64,7 +64,7 @@ Result> MutableKeyOffsetIndex::HashKeys( } Status MutableKeyOffsetIndex::EnsureMutable() { - if (offsets_.unique()) { + if (offsets_.use_count() == 1) { return Status::OK(); } PAIMON_ASSIGN_OR_RAISE(