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: make sure stats's op count and size are in sync #10041

Closed
wants to merge 2 commits into from

Conversation

bleskes
Copy link
Contributor

@bleskes bleskes commented Mar 9, 2015

During translog flush there is a very small window where translog stats reports can be inconsistent.

Example:

"translog" : {
   "operations" : 37415948,
   "size_in_bytes" : 0
},

During translog flush there is a very small window where translog stats reports can be inconsistent.
@dakrone
Copy link
Member

dakrone commented Mar 10, 2015

LGTM

@@ -466,6 +466,11 @@ public void syncOnEachOperation(boolean syncOnEachOperation) {

@Override
public TranslogStats stats() {
return new TranslogStats(estimatedNumberOfOperations(), translogSizeInBytes());
FsTranslogFile current1 = this.current;
Copy link
Contributor

Choose a reason for hiding this comment

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

can we name this just current I think this 1 is not necessary!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fair enough. I used the same pattern used in the file in other places.

@s1monw
Copy link
Contributor

s1monw commented Mar 10, 2015

left one comment

bleskes added a commit that referenced this pull request Mar 13, 2015
During translog flush there is a very small window where translog stats reports can be inconsistent.

Closes #10041
bleskes added a commit that referenced this pull request Mar 13, 2015
During translog flush there is a very small window where translog stats reports can be inconsistent.

Closes #10041
@bleskes bleskes closed this in 3fbd934 Mar 13, 2015
@bleskes bleskes deleted the translog_stats branch March 13, 2015 17:45
@clintongormley clintongormley added :Data Management/Stats Statistics tracking and retrieval APIs and removed review labels Mar 19, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
During translog flush there is a very small window where translog stats reports can be inconsistent.

Closes elastic#10041
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.

4 participants