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

Remove unused compactor code #886

Merged
merged 3 commits into from
Jan 25, 2022
Merged

Remove unused compactor code #886

merged 3 commits into from
Jan 25, 2022

Conversation

pstibrany
Copy link
Member

What this PR does: This PR removes unused code left in compactor package, after Mimir switched to using split-and-merge compactor only.

Checklist

  • Tests updated
  • [na] Documentation added
  • [na] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
m4.MinTime = 0
m4.MaxTime = 2 * time.Hour.Milliseconds()

var m5 metadata.Meta
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added extra block, otherwise m4 would have nothing to merge with.

Signed-off-by: Peter Štibraný <[email protected]>
@@ -91,16 +93,29 @@ func TestSyncer_GarbageCollect_e2e(t *testing.T) {
m3.Compaction.Level = 3
m3.Compaction.Sources = ids[:9] // last source ID is not part of level 3 block.
m3.Thanos.Downsample.Resolution = 0
m3.MinTime = 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we need it for m1 and m2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need it for blocks that are passed to SplitAndMergeGrouper, that is metas[9], m3, m4 and m5. I can set it for all blocks if you prefer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sorry for sending obsolete answer too. It's deleted now.)

Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code removal is fine. Changes to tests are a bit tricky but from a quick look they make sense to me.

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