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

Merged
merged 2 commits into from Jan 11, 2016

Conversation

Projects
None yet
4 participants
@brwe
Contributor

brwe commented Jan 11, 2016

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.

Initialize translog before scheduling the sync to disk
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 {

This comment has been minimized.

@bleskes

bleskes Jan 11, 2016

Member

I'm doubting whether we should have the test - i don't think it buys much . A reference to the build failure is enough?

@bleskes

This comment has been minimized.

Member

bleskes commented Jan 11, 2016

good catch. LGTM. Doubting about the extra test.

@s1monw

This comment has been minimized.

Contributor

s1monw commented Jan 11, 2016

LGTM too I agree the test is optional but not much of a cost either

@brwe

This comment has been minimized.

Contributor

brwe commented Jan 11, 2016

what now? remove it or not?

@s1monw

This comment has been minimized.

Contributor

s1monw commented Jan 11, 2016

flip a coin

@bleskes

This comment has been minimized.

Member

bleskes commented Jan 11, 2016

When in doubt - less is better :)

On 11 Jan 2016, at 12:26, Simon Willnauer notifications@github.com wrote:

flip a coin


Reply to this email directly or view it on GitHub.

@brwe

This comment has been minimized.

Contributor

brwe commented Jan 11, 2016

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.

brwe added a commit that referenced this pull request Jan 11, 2016

Merge pull request #15881 from brwe/translog-init-npe
Initialize translog before scheduling the sync to disk

@brwe brwe merged commit 7ffccc0 into elastic:2.x Jan 11, 2016

1 check passed

CLA Commit author is a member of Elasticsearch
Details

@s1monw s1monw added v2.1.3 v2.0.4 and removed v2.0.3 v2.1.2 labels Jan 11, 2016

@clintongormley clintongormley added v2.2.0 and removed v2.2.1 labels Jan 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment