From ecea96b2ef5461dc8aaf1f33c08b46916a322cf9 Mon Sep 17 00:00:00 2001 From: Jan Teske Date: Thu, 4 Dec 2025 12:09:55 +0100 Subject: [PATCH] adapter: remove expensive confirm_leadership call This commit removes a potentially expensive `confirm_leadership` call on the sequencing thread. The call needs to potentially block for a long time, as it waits for the persist catalog to catch up and then applies all the observed changes. During that time, the environment would be unresponsive to commands, so it seems like a good idea to get rid of the call. --- src/adapter/src/coord/appends.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/adapter/src/coord/appends.rs b/src/adapter/src/coord/appends.rs index 7adc4be79f9ec..04bd1cbc0b9b1 100644 --- a/src/adapter/src/coord/appends.rs +++ b/src/adapter/src/coord/appends.rs @@ -445,19 +445,6 @@ impl Coordinator { advance_to, } = self.get_local_write_ts().await; - // While we're flipping on the feature flags for txn-wal tables and - // the separated Postgres timestamp oracle, we also need to confirm - // leadership on writes _after_ getting the timestamp and _before_ - // writing anything to table shards. - // - // TODO: Remove this after both (either?) of the above features are on - // for good and no possibility of running the old code. - let () = self - .catalog - .confirm_leadership() - .await - .unwrap_or_terminate("unable to confirm leadership"); - let mut appends: BTreeMap> = BTreeMap::new(); let mut responses = Vec::with_capacity(validated_writes.len()); let mut notifies = Vec::new();