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
Initialize translog before scheduling the sync to disk #15881
Conversation
Otherwise Translog.current might be null when we call syncNeeded().
@@ -1480,6 +1485,23 @@ public void run() { | |||
protected void afterAdd() throws IOException {} | |||
} | |||
|
|||
public void testTranslogCreateWithSmallSyncInterval() throws IOException, InterruptedException { |
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'm doubting whether we should have the test - i don't think it buys much . A reference to the build failure is enough?
good catch. LGTM. Doubting about the extra test. |
LGTM too I agree the test is optional but not much of a cost either |
what now? remove it or not? |
flip a coin |
9a5aa70
to
8ce42ec
Compare
When in doubt - less is better :)
|
I flipped a coin but then was too clumsy to catch it...so I tried if we have failures in unit tests without that one and there were many so I decided to remove this test. |
Initialize translog before scheduling the sync to disk
Otherwise Translog.current might be null when we call syncNeeded().
I saw this in the log of a failed test here: http://build-us-00.elastic.co/job/es_core_21_metal/326/consoleText
Unfortunately it is not the reason for the test failure.