[slack-22.0] backport: fix: consolidator waiter cap fallback to independent execution (#716)#726
Merged
tanjinx merged 2 commits intoslack-22.0from Oct 31, 2025
Merged
Conversation
* fix: consolidator waiter cap fallback to independent execution When the consolidator waiter cap is reached, queries should fall back to independent execution instead of returning empty results. Before this fix: - Queries exceeding waiter cap would skip waiting for consolidation - They would immediately try to access q.Result() before completion - This resulted in empty/incomplete results being returned After this fix: - Queries exceeding waiter cap fall back to regular execution path - All queries return correct results regardless of consolidation status - Waiter cap configuration still controls resource usage as intended Changes: - Modified execSelect() in query_executor.go to implement fallback logic - Enhanced FakePendingResult to properly simulate waiter count behavior - Added comprehensive test TestQueryExecutorConsolidatorWaiterCapFallback Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * implement consolidator-query-waiter-cap-method * fix help message Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com> * fix redundant code * fix test Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com> * feat: add consolidator-query-waiter-cap-method config parameter Add --consolidator-query-waiter-cap-method flag to control behavior when consolidator waiter cap is exceeded. Options: - 'fallthrough' (default): Fall back to independent query execution - 'reject': Return RESOURCE_EXHAUSTED error This provides operators fine-grained control over consolidator memory management while maintaining backward compatibility. Changes: - Add ConsolidatorQueryWaiterCapMethod config field and CLI flag - Update execSelect() to handle both reject and fallthrough behaviors - Add comprehensive test coverage for both methods - Add config validation with graceful defaults - Fix waiter counter cleanup to ensure proper resource management Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> --------- Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
sbaker617
approved these changes
Oct 30, 2025
tanjinx
added a commit
that referenced
this pull request
Nov 10, 2025
…#726) * fix: consolidator waiter cap fallback to independent execution When the consolidator waiter cap is reached, queries should fall back to independent execution instead of returning empty results. Before this fix: - Queries exceeding waiter cap would skip waiting for consolidation - They would immediately try to access q.Result() before completion - This resulted in empty/incomplete results being returned After this fix: - Queries exceeding waiter cap fall back to regular execution path - All queries return correct results regardless of consolidation status - Waiter cap configuration still controls resource usage as intended Changes: - Modified execSelect() in query_executor.go to implement fallback logic - Enhanced FakePendingResult to properly simulate waiter count behavior - Added comprehensive test TestQueryExecutorConsolidatorWaiterCapFallback * implement consolidator-query-waiter-cap-method * fix help message * fix redundant code * fix test * feat: add consolidator-query-waiter-cap-method config parameter Add --consolidator-query-waiter-cap-method flag to control behavior when consolidator waiter cap is exceeded. Options: - 'fallthrough' (default): Fall back to independent query execution - 'reject': Return RESOURCE_EXHAUSTED error This provides operators fine-grained control over consolidator memory management while maintaining backward compatibility. Changes: - Add ConsolidatorQueryWaiterCapMethod config field and CLI flag - Update execSelect() to handle both reject and fallthrough behaviors - Add comprehensive test coverage for both methods - Add config validation with graceful defaults - Fix waiter counter cleanup to ensure proper resource management --------- Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
sbaker617
pushed a commit
that referenced
this pull request
Feb 5, 2026
…#726) * fix: consolidator waiter cap fallback to independent execution When the consolidator waiter cap is reached, queries should fall back to independent execution instead of returning empty results. Before this fix: - Queries exceeding waiter cap would skip waiting for consolidation - They would immediately try to access q.Result() before completion - This resulted in empty/incomplete results being returned After this fix: - Queries exceeding waiter cap fall back to regular execution path - All queries return correct results regardless of consolidation status - Waiter cap configuration still controls resource usage as intended Changes: - Modified execSelect() in query_executor.go to implement fallback logic - Enhanced FakePendingResult to properly simulate waiter count behavior - Added comprehensive test TestQueryExecutorConsolidatorWaiterCapFallback * implement consolidator-query-waiter-cap-method * fix help message * fix redundant code * fix test * feat: add consolidator-query-waiter-cap-method config parameter Add --consolidator-query-waiter-cap-method flag to control behavior when consolidator waiter cap is exceeded. Options: - 'fallthrough' (default): Fall back to independent query execution - 'reject': Return RESOURCE_EXHAUSTED error This provides operators fine-grained control over consolidator memory management while maintaining backward compatibility. Changes: - Add ConsolidatorQueryWaiterCapMethod config field and CLI flag - Update execSelect() to handle both reject and fallthrough behaviors - Add comprehensive test coverage for both methods - Add config validation with graceful defaults - Fix waiter counter cleanup to ensure proper resource management --------- Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
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.
When the consolidator waiter cap is reached, queries should fall back to independent execution instead of returning empty results.
Before this fix:
After this fix:
Changes:
implement consolidator-query-waiter-cap-method
fix help message
fix redundant code
fix test
feat: add consolidator-query-waiter-cap-method config parameter
Add --consolidator-query-waiter-cap-method flag to control behavior when consolidator waiter cap is exceeded. Options:
This provides operators fine-grained control over consolidator memory management while maintaining backward compatibility.
Changes:
Description
Related Issue(s)
Checklist
Deployment Notes
AI Disclosure