Skip to content

Commit

Permalink
Internal: an inactive shard is temporarily activated by triggered syn…
Browse files Browse the repository at this point in the history
…ced flush

When a shard becomes in active we trigger a sync flush in order to speed up future recoveries. The sync flush causes a new translog generation to be made, which in turn confuses the IndexingMemoryController making it think that the shard is active. If no documents comes along in the next 5m, the shard is made inactive again , triggering a sync flush and so forth.

To avoid this, the IndexingMemoryController is changed to ignore empty translogs when checking if a shard became active. This comes with the price of potentially missing indexing operations which are followed by a flush. This is acceptable as if no more index operation come in, it's OK to leave the shard in active.

A new unit test is introduced and comparable integration tests are removed.

Closes elastic#13802
  • Loading branch information
bleskes committed Sep 27, 2015
1 parent ebe02ec commit 148265b
Show file tree
Hide file tree
Showing 3 changed files with 511 additions and 213 deletions.

0 comments on commit 148265b

Please sign in to comment.