Skip to content
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

[aggregator] Process campaign state without waiting for first campaign check interval #2855

Merged
merged 3 commits into from
Nov 8, 2020

Conversation

vdarulis
Copy link
Collaborator

@vdarulis vdarulis commented Nov 8, 2020

This fixes an annoying behavior, where campaign manager will always have a delay of $campaignCheckInterval, even if the process has crashed/restarted and lease hasn't expired yet. It also makes other tests that rely on non-mocked-out campaign manager much slower than they need to be.

The initialization delay also exposed some racy behavior in campaign manager tests. Fixing everything and reducing sleeps sped them up by quite a bit:

~# go test  github.com/m3db/m3/src/aggregator/aggregator  -tags integration  -count 1
ok  	github.com/m3db/m3/src/aggregator/aggregator	12.460s

vs

ok  	github.com/m3db/m3/src/aggregator/aggregator	34.935s

What this PR does / why we need it:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:


Does this PR require updating code package or user-facing documentation?:


@abliqo
Copy link
Collaborator

abliqo commented Nov 8, 2020

LGTM

@vdarulis vdarulis merged commit 3f81fe3 into master Nov 8, 2020
@vdarulis vdarulis deleted the v/slow_tests branch November 8, 2020 17:19
soundvibe added a commit that referenced this pull request Nov 11, 2020
* master: (28 commits)
  [dbnode] Add claims for index segments volume index (#2846)
  [dbnode] Remove namespaces from example config and integration tests (#2866)
  [dbnode] Resurrect flaky test skip (#2868)
  [aggregator] Fix checkCampaignStateLoop (#2867)
  [dbnode] implement deletion method in namespace kvadmin service (#2861)
  Replace closer with resource package (#2864)
  Add coding style guide (#2831)
  Add GOVERNANCE.md to describe governance (#2830)
  Add COMPATIBILITY.md to describe version compatibility (#2829)
  Refactor etcd config as discovery section with convenience types (#2843)
  Refactor x/lockfile into dbnode/server (#2862)
  [lint] Disable nlreturn linter (#2865)
  [m3cluster] Expose placement algorithm in placement service (#2858)
  [etcd] Set reasonable cluster connection/sync settings by default (#2860)
  [dbnode] Use bits.LeadingZeros64 to improve encoder performance (#2857)
  Cleanup m3nsch leftovers (#2856)
  Update ci-scripts to correct coverage tracking (#2854)
  [aggregator] Process campaign state without waiting for first campaign check interval (#2855)
  Bump go to 1.14 (#2853)
  [query] Remove single series error from M3
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants