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

ByteSizeValue.equals should normalize units #13784

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@bleskes
Member

bleskes commented Sep 25, 2015

currently ByteSizeValue.parse("1GB") is not equal to ByteSizeValue.parse("1024MB")

ByteSizeValue.equals should normalize units
currently ByteSizeValue.parse("1GB") is not equal to ByteSizeValue.parse("1024MB")
@bleskes

This comment has been minimized.

Show comment
Hide comment
@bleskes

bleskes Sep 25, 2015

Member

@javanna can you take a look please?

Member

bleskes commented Sep 25, 2015

@javanna can you take a look please?

@bleskes

This comment has been minimized.

Show comment
Hide comment
@bleskes

bleskes Sep 25, 2015

Member

@jpountz pushed another commit.

Member

bleskes commented Sep 25, 2015

@jpountz pushed another commit.

@jpountz

This comment has been minimized.

Show comment
Hide comment
@jpountz

jpountz Sep 25, 2015

Contributor

LGTM

Contributor

jpountz commented Sep 25, 2015

LGTM

@bleskes

This comment has been minimized.

Show comment
Hide comment
@bleskes

bleskes Sep 25, 2015

Member

thx @jpountz are you +1 on pushing this to 2.0 as well?

Member

bleskes commented Sep 25, 2015

thx @jpountz are you +1 on pushing this to 2.0 as well?

@jpountz

This comment has been minimized.

Show comment
Hide comment
@jpountz

jpountz Sep 25, 2015

Contributor

It looks like a low-risk fix, so 2.0 works for me.

Contributor

jpountz commented Sep 25, 2015

It looks like a low-risk fix, so 2.0 works for me.

@bleskes bleskes closed this in 5a0f2fd Sep 25, 2015

@bleskes bleskes deleted the bleskes:byte_size_value branch Sep 25, 2015

bleskes added a commit that referenced this pull request Sep 25, 2015

ByteSizeValue.equals should normalize units
currently ByteSizeValue.parse("1GB") is not equal to ByteSizeValue.parse("1024MB")

Closes #13784

bleskes added a commit that referenced this pull request Sep 25, 2015

ByteSizeValue.equals should normalize units
currently ByteSizeValue.parse("1GB") is not equal to ByteSizeValue.parse("1024MB")

Closes #13784

bleskes added a commit to bleskes/elasticsearch that referenced this pull request Sep 28, 2015

Internal: an inactive shard is activated by triggered synced 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.

Relates #13802
Includes a backport of #13784

bleskes added a commit to bleskes/elasticsearch that referenced this pull request Sep 28, 2015

Internal: an inactive shard is activated by triggered synced 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.

Relates #13802
Includes a backport of #13784

Closes #13824

@clintongormley clintongormley added v2.0.0-rc1 and removed v2.0.0 labels Oct 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment