-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Set lookback in ES rollover to distant past #3169
Set lookback in ES rollover to distant past #3169
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3169 +/- ##
==========================================
+ Coverage 95.91% 95.94% +0.02%
==========================================
Files 239 239
Lines 14649 14655 +6
==========================================
+ Hits 14051 14061 +10
+ Misses 520 518 -2
+ Partials 78 76 -2
Continue to review full report at Codecov.
|
// In rollover only read alias is used to query the data so looking far into the past should | ||
// not affect performance. | ||
if p.UseReadWriteAliases { | ||
maxSpanAge = time.Hour * 24 * 365 * 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should extend TestNewSpanReader
, maybe converting it to a table-driven test, to prevent a regression on this functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Signed-off-by: Pavol Loffay <[email protected]>
3783edb
to
f13cd83
Compare
Signed-off-by: Pavol Loffay <[email protected]>
@albertteoh PR updated |
for _, test := range tests { | ||
t.Run(test.name, func(t *testing.T) { | ||
reader := NewSpanReader(test.params) | ||
require.NotNil(t, reader) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you're missing the assertion on test.maxSpanAge
here (I would rename it test.wantMaxSpanAge
to make it clear it's the expected value)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doh, fixed
Signed-off-by: Pavol Loffay <[email protected]>
Resolves #3152
@albertteoh could you please review?