Batch Index Settings Update Requests#82896
Conversation
original-brownbear
left a comment
There was a problem hiding this comment.
Looks good, just one quick comment for now. We do need to figured out how/why this breaks tests though.
| } | ||
| } | ||
| // reroute in case things change that require it (like number of replicas) | ||
| state = allocationService.reroute(state, "settings update"); |
There was a problem hiding this comment.
let's skip this in case the batch was a NOOP and currentState == state
It's the first thing the reroute call itself actually called, so we're keeping a portion of a full reroute call here, but deferring the rest of it until the end of the executor loop.
|
Pinging @elastic/es-distributed (Team:Distributed) |
| .build(); | ||
| // we need to tweak auto expand replicas in order to avoid tripping assertions in | ||
| // AllocationService.reroute(RoutingAllocation allocation) -- this is far from ideal | ||
| updatedState = allocationService.adaptAutoExpandReplicas(updatedState); |
There was a problem hiding this comment.
Just to share the discussion we had on this:
This may be something we want to fix in some form. It's somewhat weird that reroute forces an assertion on us that ensure that this was called. Maybe this logic should be part of the settings update itself somehow so we don't even have to grind through all the indices here to check if any of them require an update for auto-expand-replicas.
There was a problem hiding this comment.
I think the problem is here:
In these tests we run each individual ClusterStateUpdateTask but with this change we moved the tidy-up reroute() call outside the individual tasks so it's not running.
There was a problem hiding this comment.
Great catch! I think 92bc39d should do the trick then, yes?
original-brownbear
left a comment
There was a problem hiding this comment.
LGTM, I'd like David to have a look at this too with the reroute weirdness. Maybe he has a better idea on how to cleanly handle this.
|
Hi @joegallo, I've created a changelog YAML for you. |
|
I opened #83097 for some of the test failures I saw here. (edit: and the fix for that has already been PRed and merged, what a world!) |
* upstream/master: (762 commits) [DOCS] Add note to that log4j customization is outside the support scope (elastic#82668) Batch Index Settings Update Requests (elastic#82896) [DOCS] Delete pipeline containing stored script (elastic#83102) Try again to fix changelog areas after reorg (elastic#83100) Bind to non-localhost for transport in some cases (elastic#82973) [DOCS] Reuse multi-level `join` warning (elastic#82976) Remove unnecessary CopyOnWriteHashMap class (elastic#83040) Adjust changelog categories after reorg (elastic#83087) [DOCS] Fix typo in `action.destructive_requires_name` breaking change (elastic#83085) Stack Monitoring: Add Enterprise Search monitoring index templates (elastic#82743) [DOCS] Fix stored script example snippet (elastic#83056) [DOCS] Re-add network traffic para to `term` query (elastic#83047) [DOCS] Rename example stored script (elastic#83054) [ML][DOCS] Add Trained model APIs to the REST APIs index (elastic#82791) [ML] Update running process when global calendar changes (elastic#83044) [Transform] Fix condition on which the transform stops processing buckets (elastic#82852) [DOCS] Fixes field names in ML sum functions. (elastic#83048) [ML] fix NLP tokenization never_split handling around punctuation (elastic#82982) Construct dynamic updates directly via object builders (elastic#81449) Emit trace.id into audit logs (elastic#82849) ... # Conflicts: # client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java # client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ILMDocumentationIT.java # server/src/main/java/org/elasticsearch/action/admin/indices/rollover/Condition.java # server/src/test/java/org/elasticsearch/action/admin/indices/rollover/ConditionTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/RolloverActionTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/TimeseriesLifecycleTypeTests.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/WaitForRolloverReadyStepTests.java
Closes #79866
Mostly follows the same shape as the changes in #82159.
WIP because this currently fails./gradlew ':server:test' --tests "org.elasticsearch.indices.cluster.IndicesClusterStateServiceRandomUpdatesTests.testRandomClusterStateUpdates"pretty reliably. 😬