-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
NullPointerException on snapshot #29052
Comments
Pinging @elastic/es-distributed |
@tlrx have you seen this before? |
If this helps, all the snapshots, Im trying to remove, done on elasticsearch 5.4.0 version. Also I have 4 different environments with same elasticsearch version and configs, but this problem I experienced just on single environment... So I think the problem is in specific snapshot... |
@gkozyryatskyy Would it be possible that, at a given time, two environments accessed to the same repository to write a snapshot? |
@tlrx theoretically, yes.. this is dev environment =( Someone can up few environments with one snapshot configs... |
@gkozyryatskyy I've seen similar issue when two different clusters are accessing the same S3 repository (more exactly, the same S3 bucket): one environment is creating a snapshot while another environment is deleting a snapshot. This is a quite rare situation, as the creation and deletion must be executed exactly at the same time, but it can still happen, specially when there's a lot of indices/documents involves in the snapshot. |
@tlrx
|
That's not easy - do you think that your case is similar to the situation I explained in #29052 (comment)? If so, they we have an explanation.
I think that the best fix would be to create a new repository, in a different S3 bucket (or a sub path of the same bucket, see
I'd love to have a fix for S3 and concurrent access :) But S3 is not a filesystem: it's a replicated, distributed, consistent-after-write blob storage system. We can't really implements locks or atomic writes with it, so we cannot have any strong guarantees except that an uploaded file will appear (after some undefined time) in the S3 bucket. If you need strong guarantees then you should consider using a real filesystem. |
@tlrx If this info helps you, Im able to delete/snapshot to this repo with elasticsearch 5.4.0. So it is not just S3 problem... Theoretically, snapshot logic can be reverted to 5.4.0 version and will work. So for now, Im thinking to delete everything with older db version and start creating new snapshots with new db version... Changing the bucket or base path is not an option right now, because it is bound to environment name and will cause renaming/changing the environment just because of db snapshots... |
@tlrx
|
A NullPointerException is thrown when trying to create or delete a snapshot in a repository that has been written to by an older Elasticsearch after writing to it with a newer Elasticsearch version. This is because the way snapshots are formatted in the repository snapshots index file changed in #24477. This commit changes the parsing of the repository index file so that it now detects a corrupted index file and fails early the snapshot operation. closes #29052
Elasticsearch version: 5.6.8 (Docker image docker.elastic.co/elasticsearch/elasticsearch:5.6.8)
Plugins installed:
JVM version (
java -version
):OS version (
uname -a
if on a Unix-like system):Description of the problem including expected versus actual behavior:
I have an s3 snapshot repo
When im trying to snapshot im getting
java.lang.NullPointerException
When im trying to delete snapshot im getting
java.lang.NullPointerException
Provide logs (if relevant):
Snapshot logs error
Delete logs error
The text was updated successfully, but these errors were encountered: