Skip to content

storage: RHS of split does not campaign automatically #9727

@tbg

Description

@tbg

Run

make test PKG=./storage TESTS=DifferentLease TESTFLAGS='-v --verbosity=4'
--- PASS: TestStoreSplitTimestampCacheDifferentLeaseHolder (3.72s)

Apply this patch (which is a hacky and incorrect reversal of #9550):

diff --git a/storage/store.go b/storage/store.go
index 459f38c..b970069 100644
--- a/storage/store.go
+++ b/storage/store.go
@@ -1526,6 +1526,9 @@ func splitTriggerPostCommit(
        r.mu.Lock()
        rightRng.mu.Lock()
        r.mu.tsCache.MergeInto(rightRng.mu.tsCache, true /* clear */)
+       rightRng.withRaftGroupLocked(true, func(r *raft.RawNode) (bool, error) {
+               return true, nil
+       })
        rightRng.mu.Unlock()
        r.mu.Unlock()
        log.Event(ctx, "copied timestamp cache")

Run it again:

--- PASS: TestStoreSplitTimestampCacheDifferentLeaseHolder (0.70s)

The eager campaigning was removed in #9550. It does seem that we require it here, and we should investigate why.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-1-stabilitySevere stability issues that can be fixed by upgrading, but usually don’t resolve by restarting

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions