Skip to content

Fix snapshot restore logging on fresh restore#40252

Merged
ywelsch merged 1 commit intoelastic:masterfrom
ywelsch:snap-restore-log
Mar 20, 2019
Merged

Fix snapshot restore logging on fresh restore#40252
ywelsch merged 1 commit intoelastic:masterfrom
ywelsch:snap-restore-log

Conversation

@ywelsch
Copy link
Copy Markdown
Contributor

@ywelsch ywelsch commented Mar 20, 2019

I noticed that restoring a snapshot was issuing some warning logs in unreleased versions of ES. This is related to a recent refactoring (#37130) where imports got mixed up (changing Lucene's IndexNotFoundException to Elasticsearch's IndexNotFoundException).

[2019-03-20T08:23:05,900][WARN ][o.e.r.b.FileRestoreContext] [node_sd3] [[ozhh][3]] [ekpkzxuvvj/2EsdxbQhQD2nUOdjdbcpvA] Can't read metadata from store, will not reuse local files during restore
org.apache.lucene.index.IndexNotFoundException: no segments* file found in store(ByteSizeCachingDirectory(ElasticsearchMockDirectoryWrapper(NIOFSDirectory@/private/var/folders/68/3gzf12zs4qb0q_gfjw5lx1fm0000gn/T/org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStoreRepositoryTests_B1EF8FCB6B58CEB6-001/tempDir-002/d0/nodes/3/indices/zv7n3ue8Qbifn_j4sJ3L7A/3/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@3b1e9f9c))): files: [write.lock]
	at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:675) ~[lucene-core-8.0.0.jar:8.0.0 2ae4746365c1ee72a0047ced7610b2096e438979 - jimczi - 2019-03-08 11:58:55]
	at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:632) ~[lucene-core-8.0.0.jar:8.0.0 2ae4746365c1ee72a0047ced7610b2096e438979 - jimczi - 2019-03-08 11:58:55]
	at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:434) ~[lucene-core-8.0.0.jar:8.0.0 2ae4746365c1ee72a0047ced7610b2096e438979 - jimczi - 2019-03-08 11:58:55]
	at org.elasticsearch.common.lucene.Lucene.readSegmentInfos(Lucene.java:150) ~[main/:?]
	at org.elasticsearch.index.store.Store.readSegmentsInfo(Store.java:213) ~[main/:?]
	at org.elasticsearch.index.store.Store.access$300(Store.java:132) ~[main/:?]
	at org.elasticsearch.index.store.Store$MetadataSnapshot.loadMetadata(Store.java:865) ~[main/:?]
	at org.elasticsearch.index.store.Store$MetadataSnapshot.<init>(Store.java:798) ~[main/:?]
	at org.elasticsearch.index.store.Store.getMetadata(Store.java:299) ~[main/:?]
	at org.elasticsearch.index.shard.IndexShard.snapshotStoreMetadata(IndexShard.java:1187) ~[main/:?]
	at org.elasticsearch.repositories.blobstore.FileRestoreContext.restore(FileRestoreContext.java:121) [main/:?]
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.restoreShard(BlobStoreRepository.java:873) [main/:?]
	at org.elasticsearch.index.shard.StoreRecovery.restore(StoreRecovery.java:473) [main/:?]
	at org.elasticsearch.index.shard.StoreRecovery.lambda$recoverFromRepository$5(StoreRecovery.java:279) [main/:?]
	at org.elasticsearch.index.shard.StoreRecovery.executeRecovery(StoreRecovery.java:302) [main/:?]
	at org.elasticsearch.index.shard.StoreRecovery.recoverFromRepository(StoreRecovery.java:277) [main/:?]
	at org.elasticsearch.index.shard.IndexShard.restoreFromRepository(IndexShard.java:1692) [main/:?]
	at org.elasticsearch.index.shard.IndexShard.lambda$startRecovery$10(IndexShard.java:2362) [main/:?]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:677) [main/:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

@ywelsch ywelsch requested a review from Tim-Brooks March 20, 2019 11:30
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed

Copy link
Copy Markdown
Contributor

@Tim-Brooks Tim-Brooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ywelsch ywelsch merged commit 8b95daa into elastic:master Mar 20, 2019
ywelsch added a commit that referenced this pull request Mar 20, 2019
A recent refactoring (#37130) where imports got mixed up (changing Lucene's
IndexNotFoundException to Elasticsearch's IndexNotFoundException) led to many warnings being
logged in case of restoring a fresh snapshot.
ywelsch added a commit that referenced this pull request Mar 20, 2019
A recent refactoring (#37130) where imports got mixed up (changing Lucene's
IndexNotFoundException to Elasticsearch's IndexNotFoundException) led to many warnings being
logged in case of restoring a fresh snapshot.
ywelsch added a commit that referenced this pull request Mar 20, 2019
A recent refactoring (#37130) where imports got mixed up (changing Lucene's
IndexNotFoundException to Elasticsearch's IndexNotFoundException) led to many warnings being
logged in case of restoring a fresh snapshot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants