Repository navigation
Conversation
Live DataIterationBatchSize updates from the control server raced with cursor and iterative-verifier reads, and LagThrottler.lag raced between its update loop and Throttled callers. - Config.Update stores the live batch size atomically; CursorConfig.GetBatchSize and the iterative verifier load it atomically. - HandleConfigGet encodes a freshly loaded UpdatableConfig snapshot. - LagThrottler guards lag with a mutex. Behavior, wire format and polling are unchanged. Refs #471
This was referenced Oct 30, 2026
Contributor
Author
|
wont do right now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #471
Stack: 1/3. Base:
main. Next: #473. Merge order: PR 1 → PR 2 → PR 3.Scope
Makes the shared inputs that gradual copy recovery (#471) composes with race-free. Throttle, polling, batch-size and wire behavior are unchanged.
Config.UpdatestoresUpdatableConfig.DataIterationBatchSizeatomically.CursorConfig.GetBatchSizeand the iterative verifier's reverify batching load it atomically.ControlServer.HandleConfigGetencodes a freshly loadedUpdatableConfigsnapshot. The/api/configfields are unchanged.LagThrottler.lag, whichRunwrites andThrottledreads.TestConcurrentBatchSizeUpdatesdrives the real/api/configGET/POST handlers throughhttptest. Concurrent POSTs alternate between 104 and 200 whileCursorConfig.GetBatchSizeis read concurrently. The test checks that every observed value is 104 or 200, that a per-table override stays 80, and that a final update to 104 shows up in both the HTTP snapshot and the cursor getter.Checks run (MySQL 8.0.32 from
docker-compose_8.0.yml)MYSQL_VERSION=8.0 go test -race ./test/go -run 'TestConcurrentBatchSizeUpdates|TestThrottlerThrottlesAndUnthrottles|TestThrottlerMultipleServerIDs|TestDataIterator/TestBatchSizeUpdate' -count=1 -p=1: pass.config.go,cursor.goandcontrol_server.goreverted,TestConcurrentBatchSizeUpdatesfails with 3DATA RACEreports under-race.MYSQL_VERSION=8.0 go test . ./test/go -count=1 -p=1: pass.POST /api/config {"DataIterationBatchSize":104}, andGET /api/configreturned{"DataIterationBatchSize":104}. The next batch had 104 rows, and all 1000 ordered source and target rows were identical.