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

Improve exception from Store.failIfCorrupted #7596

Closed
rmuir opened this Issue Sep 4, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@rmuir
Copy link
Contributor

commented Sep 4, 2014

If you have previously corrupted files, this method currently builds an exception like:

failed engine [corrupted preexisting index]
failed to start shard

Followed by a CorruptIndexException:

builder.append(" Corrupted index [");
builder.append(file).append("] caused by: ");
builder.append(msg);
ex.add(new CorruptIndexException(builder.toString()));

Is it possible to improve this:

  1. In the string we write (msg), can the string have more details when we write it, e.g. including full stracktrace?
  2. can we change the text 'corrupted preexisting index' to either 'preexisting corrupted index' or 'index has preexisting corruption' or similar?
@s1monw

This comment has been minimized.

Copy link
Contributor

commented Sep 5, 2014

I wonder if we should do both. And log the stacktrace as debug?

@clintongormley

This comment has been minimized.

Copy link
Member

commented Sep 6, 2014

@rmuir are you taking this or should it be an adoptme?

s1monw added a commit to s1monw/elasticsearch that referenced this issue Sep 11, 2014

[STORE] Improve exception from Store.failIfCorrupted
If you have previously corrupted files, this method currently builds an
exception like:
```
    failed engine [corrupted preexisting index]
    failed to start shard
```

Followed by a CorruptIndexException. This commit writes the entire
stacktrace to provide additional information. It also changes the
failure message from `corrupted preexisting index` to `preexisting
corrupted index` to prevent confusion.

Closes elastic#7596

s1monw added a commit that referenced this issue Sep 11, 2014

[STORE] Improve exception from Store.failIfCorrupted
If you have previously corrupted files, this method currently builds an
exception like:
```
    failed engine [corrupted preexisting index]
    failed to start shard
```

Followed by a CorruptIndexException. This commit writes the entire
stacktrace to provide additional information. It also changes the
failure message from `corrupted preexisting index` to `preexisting
corrupted index` to prevent confusion.

Closes #7596

@s1monw s1monw closed this in #7695 Sep 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.