-
Notifications
You must be signed in to change notification settings - Fork 24.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce global checkpoint background sync #26591
Introduce global checkpoint background sync #26591
Commits on Sep 11, 2017
-
Introduce global checkpoint background sync
It is the exciting return of the global checkpoint background sync. Long, long ago, in snapshot version far, far away we had and only had a global checkpoint background sync. This sync would fire periodically and send the global checkpoint from the primary shard to the replicas so that they could update their local knowledge of the global checkpoint. Later in time, as we sped ahead towards finalizing the initial version of sequence IDs, we realized that we need the global checkpoint updates to be inline. This means that on a replication operation, the primary shard would piggy back the global checkpoint with the replication operation to the replicas. The replicas would update their local knowledge of the global checkpoint and reply with their local checkpoint. However, this could allow the global checkpoint on the primary to advance again and the replicas would fall behind in their local knowledge of the global checkpoint. If another replication operation never fired, then the replicas would be permanently behind. To account for this, we added one more sync that would fire when the primary shard fell idle. However, this has problems: - the shard idle timer defaults to five minutes, a long time to wait for the replicas to learn of the new global checkpoint - if a replica missed the sync, there was no follow-up sync to catch them up - there is an inherent race condition where the primary shard could fall idle mid-operation (after having sent the replication request to the replicas); in this case, there would never be a background sync after the operation completes - tying the global checkpoint sync to the idle timer was never natural To fix this, we add back a global checkpoint background sync that fires on a timer. This timer fires every thirty seconds, and is not configurable (for simplicity). This background sync is smarter in the sense that it only sends a sync if the global checkpoint on at least one replica is lagging that of the primary. This necessitates adding the primary shard tracking its knowledge of the local knowledge of the global checkpoint on the replicas. When the timer fires, we can compare the global checkpoint on the primary to its knowledge of the global checkpoint on the replicas and only send a sync if there is a shard behind. During replication operations it can be the case that the timer fires and sends a sync that would be covered by an in-flight operation. This is okay, the extra sync does not hurt and we do not need the complexity of optimizing away this duplicate sync.
Configuration menu - View commit details
-
Copy full SHA for c0e7443 - Browse repository at this point
Copy the full SHA c0e7443View commit details -
Configuration menu - View commit details
-
Copy full SHA for 511f96e - Browse repository at this point
Copy the full SHA 511f96eView commit details
Commits on Sep 12, 2017
-
Configuration menu - View commit details
-
Copy full SHA for e1dc814 - Browse repository at this point
Copy the full SHA e1dc814View commit details
Commits on Sep 19, 2017
-
Merge branch 'master' into global-checkpoint-sync
* master: (67 commits) Restoring from snapshot should force generation of a new history uuid (elastic#26694) test: Use a single primary shard so that the exception can caught in the same way Move pre-6.0 node checkpoint to SequenceNumbers Invalid JSON request body caused endless loop (elastic#26680) added comment fix line length violation Moved the check to fetch phase. This basically means that we throw a better error message instead of an AOBE and not adding more restrictions. inner hits: Do not allow inner hits that use _source and have a non nested object field as parent Separate Painless Whitelist Loading from the Painless Definition (elastic#26540) convert more admin requests to writeable (elastic#26566) Handle release of 5.6.1 Allow `InputStreamStreamInput` array size validation where applicable (elastic#26692) Update global checkpoint with permit after recovery Filter pre-6.0 nodes for checkpoint invariants Skip bad request REST test on pre-6.0 Reenable BWC tests after disabling for backport Add global checkpoint tracking on the primary [Test] Fix reference/cat/allocation/line_8 test failure [Docs] improved description for fs.total.available_in_bytes (elastic#26657) Fix discovery-file plugin to use custom config path ...
Configuration menu - View commit details
-
Copy full SHA for 86ddf79 - Browse repository at this point
Copy the full SHA 86ddf79View commit details
Commits on Sep 20, 2017
-
Configuration menu - View commit details
-
Copy full SHA for e0657a7 - Browse repository at this point
Copy the full SHA e0657a7View commit details -
Merge branch 'master' into global-checkpoint-sync
* master: Remove assertion from checkpoint tracker invariants Upgrade API: fix excessive logging and unnecessary template updates (elastic#26698)
Configuration menu - View commit details
-
Copy full SHA for b79b13f - Browse repository at this point
Copy the full SHA b79b13fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f7a76cd - Browse repository at this point
Copy the full SHA f7a76cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3881d76 - Browse repository at this point
Copy the full SHA 3881d76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89bbf84 - Browse repository at this point
Copy the full SHA 89bbf84View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1082a31 - Browse repository at this point
Copy the full SHA 1082a31View commit details -
Merge branch 'master' into global-checkpoint-sync
* master: [DOCS] Added index-shared4 and index-shared5.asciidoc BulkProcessor flush runnable preserves the thread context from creation time (elastic#26718) Catch exceptions and inform handler in RemoteClusterConnection#collectNodes (elastic#26725) [Docs] Fix name of character filter in example. (elastic#26724) Remove parse field deprecations in query builders (elastic#26711) elastic#26720: Set the correct bwc version after backport to 6.0 Remove deprecated type and slop field in MatchQueryBuilder (elastic#26720) Refactoring of Gateway*** classes (elastic#26706) Make RestHighLevelClient's Request class public (elastic#26627) Deguice ActionFilter (elastic#26691) aggs: Allow aggregation sorting via nested aggregation. Build: Set bwc builds to always set snapshot (elastic#26704) File Discovery: Remove fallback with zen discovery (elastic#26667)
Configuration menu - View commit details
-
Copy full SHA for 15453b4 - Browse repository at this point
Copy the full SHA 15453b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa0c62c - Browse repository at this point
Copy the full SHA aa0c62cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 721f725 - Browse repository at this point
Copy the full SHA 721f725View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9bc5155 - Browse repository at this point
Copy the full SHA 9bc5155View commit details
Commits on Sep 21, 2017
-
Revert "remove background sync test setting"
This reverts commit 9bc5155.
Configuration menu - View commit details
-
Copy full SHA for 63e9d80 - Browse repository at this point
Copy the full SHA 63e9d80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ade720 - Browse repository at this point
Copy the full SHA 6ade720View commit details -
They can not work right not until this is backported; a primary running 6.x code without this patch will not be sending the global checkpoint sync yet.
Configuration menu - View commit details
-
Copy full SHA for 354df1c - Browse repository at this point
Copy the full SHA 354df1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 79742ea - Browse repository at this point
Copy the full SHA 79742eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9fc19d - Browse repository at this point
Copy the full SHA d9fc19dView commit details -
Configuration menu - View commit details
-
Copy full SHA for afb082f - Browse repository at this point
Copy the full SHA afb082fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9bf875e - Browse repository at this point
Copy the full SHA 9bf875eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 007d5c4 - Browse repository at this point
Copy the full SHA 007d5c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb9373b - Browse repository at this point
Copy the full SHA cb9373bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e6d1bf - Browse repository at this point
Copy the full SHA 7e6d1bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for f7295ac - Browse repository at this point
Copy the full SHA f7295acView commit details -
Configuration menu - View commit details
-
Copy full SHA for f237d88 - Browse repository at this point
Copy the full SHA f237d88View commit details -
Configuration menu - View commit details
-
Copy full SHA for e88b92c - Browse repository at this point
Copy the full SHA e88b92cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 030156d - Browse repository at this point
Copy the full SHA 030156dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0343372 - Browse repository at this point
Copy the full SHA 0343372View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf4e67b - Browse repository at this point
Copy the full SHA cf4e67bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f82df30 - Browse repository at this point
Copy the full SHA f82df30View commit details -
Configuration menu - View commit details
-
Copy full SHA for 507806b - Browse repository at this point
Copy the full SHA 507806bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 530addd - Browse repository at this point
Copy the full SHA 530adddView commit details -
Configuration menu - View commit details
-
Copy full SHA for f3b04dc - Browse repository at this point
Copy the full SHA f3b04dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5030a77 - Browse repository at this point
Copy the full SHA 5030a77View commit details -
Configuration menu - View commit details
-
Copy full SHA for b640b10 - Browse repository at this point
Copy the full SHA b640b10View commit details -
Configuration menu - View commit details
-
Copy full SHA for cccdec6 - Browse repository at this point
Copy the full SHA cccdec6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d43f794 - Browse repository at this point
Copy the full SHA d43f794View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26e4c76 - Browse repository at this point
Copy the full SHA 26e4c76View commit details -
Configuration menu - View commit details
-
Copy full SHA for b80b728 - Browse repository at this point
Copy the full SHA b80b728View commit details -
Configuration menu - View commit details
-
Copy full SHA for b8adcce - Browse repository at this point
Copy the full SHA b8adcceView commit details -
Merge branch 'master' into global-checkpoint-sync
* master: Add permission checks before reading from HDFS stream (elastic#26716) muted test [Docs] Fixed typo of *configuration* (elastic#25058) Add azure storage endpoint suffix elastic#26432 (elastic#26568)
Configuration menu - View commit details
-
Copy full SHA for c041ea2 - Browse repository at this point
Copy the full SHA c041ea2View commit details