Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Pending operations in the translog prevent shard from being marked as inactive #13759
The IndexingMemoryController checks periodically if there is any indexing activity on the shard. If no activity is seen for 5m (default) the shard is marked as inactive allowing it's indexing buffer quota to be given to other active shards.
Sadly the current check is bad as it checks for 0 translog operations. This makes the inactive wait for a flush to happen - which used to take 30m and since #13707 doesn't happen at all (as we rely on the synced flush triggered by inactivity). This commit fixes the check so it will work with any translog size.