Skip to content
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

Translog: stats fail to serialize size #10105

Closed
wants to merge 2 commits into from

Conversation

bleskes
Copy link
Contributor

@bleskes bleskes commented Mar 16, 2015

No description provided.

}

@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(estimatedNumberOfOperations);
if (out.getVersion().onOrAfter(Version.V_1_5_0)) {
out.writeLong(translogSizeInBytes);
Copy link
Member

Choose a reason for hiding this comment

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

Should we use readVLong/writeVLong, or can this be negative?

Copy link
Contributor

Choose a reason for hiding this comment

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

++

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My rational is that this is not a high performance API, so I tend not to use writeVLong because of it's limitation regarding negative numbers. Will change though, as here it's possible.

@s1monw
Copy link
Contributor

s1monw commented Mar 16, 2015

left some comment

@dakrone
Copy link
Member

dakrone commented Mar 16, 2015

@bleskes do you think it'd be worth adding a backwards compatibility test for translog stats in general?

@bleskes
Copy link
Contributor Author

bleskes commented Mar 16, 2015

@dakrone @s1monw thx. pushed another commit.

@dakrone we have some BWC test where we check that the stats are serialized and deserialized, so for example, NodesStatsBasicBackwardsCompatTests . good enough for now?

@s1monw
Copy link
Contributor

s1monw commented Mar 16, 2015

LGTM

@dakrone
Copy link
Member

dakrone commented Mar 16, 2015

@bleskes works for me, LGTM too!

bleskes added a commit that referenced this pull request Mar 16, 2015
bleskes added a commit that referenced this pull request Mar 16, 2015
bleskes added a commit that referenced this pull request Mar 16, 2015
@bleskes bleskes closed this in a1f5c34 Mar 16, 2015
@bleskes bleskes deleted the translog_stats_serialization branch March 16, 2015 17:57
@clintongormley clintongormley added :Data Management/Stats Statistics tracking and retrieval APIs and removed :Translog labels Jun 8, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants