Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/index_schema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,11 @@ vmsdk::BlockedClientCategory IndexSchema::GetBlockedCategoryFromProto() const {
}
}

bool IndexSchema::IsKeyInFlight(const InternedStringPtr &key) const {
absl::MutexLock lock(&mutated_records_mutex_);
return tracked_mutated_records_.contains(key);
}

bool IndexSchema::InTrackedMutationRecords(
const InternedStringPtr &key, const std::string &identifier) const {
absl::MutexLock lock(&mutated_records_mutex_);
Expand Down
2 changes: 2 additions & 0 deletions src/index_schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ class IndexSchema : public KeyspaceEventSubscription,
bool from_backfill, bool block_client,
bool from_multi)
ABSL_LOCKS_EXCLUDED(mutated_records_mutex_);
bool IsKeyInFlight(const InternedStringPtr &key) const
ABSL_LOCKS_EXCLUDED(mutated_records_mutex_);
std::optional<MutatedAttributes> ConsumeTrackedMutatedAttribute(
const InternedStringPtr &key, bool first_time)
ABSL_LOCKS_EXCLUDED(mutated_records_mutex_);
Expand Down
Loading