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

Recovery: add total operations to the _recovery API #10042

Closed
wants to merge 3 commits into from

Conversation

bleskes
Copy link
Contributor

@bleskes bleskes commented Mar 9, 2015

This commit adds the current total number of translog operations to the recovery reporting API. We also expose the recovered / total percentage:

"translog": {
     "recovered": 536,
     "total": 986,
     "percent": "54.3%",
     "total_time": "2ms",
     "total_time_in_millis": 2
},

Closes #9368

This commit adds the current total number of translog operations to the recovery reporting API.  We also expose the recovered / total percentage:

```
"translog": {
     "recovered": 536,
     "total": 986,
     "percent": "54.3%",
     "total_time": "2ms",
     "total_time_in_millis": 2
},
```

Closes elastic#9368
@bleskes bleskes added >enhancement v2.0.0-beta1 review v1.5.0 :Distributed/Recovery Anything around constructing a new shard, either from a local or a remote source. labels Mar 9, 2015
@@ -331,6 +332,7 @@ public void testStageSequenceEnforcement() {
assertThat(state.getStage(), equalTo(Stage.DONE));
}

@Repeat(iterations = 300)
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this just for local beasting or you mean to push it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah. slipped in with the latest commit. will remove. thx,

@mikemccand
Copy link
Contributor

LGTM

@@ -493,51 +493,105 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
}

public static class Translog extends Timer implements ToXContent, Streamable {
private final AtomicInteger currentTranslogOperations = new AtomicInteger();
public static int UNKNOWN = -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

this must be final!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OOPS! fixing..

@kimchy
Copy link
Member

kimchy commented Mar 13, 2015

@bleskes something minor that I saw, I think the percent should be a number, so it can be plotted for example, so: percent: 54.3, it would be nice not to call it percent, but something more descriptive

@bleskes
Copy link
Contributor Author

bleskes commented Mar 13, 2015

@kimchy yeah, I followed the existing pattern but it always bugged me. I'll change it. Double checking we're OK with breaking bwc here? I want this changed to go in 1.5. /cc @s1monw

@bleskes
Copy link
Contributor Author

bleskes commented Mar 16, 2015

@kimchy I discussed the percentage formatting with @s1monw . Plan is to get this is in as is and change the percentage formatting in another PR for 2.0 only.

@bleskes
Copy link
Contributor Author

bleskes commented Mar 16, 2015

@s1monw pushed another round

@s1monw
Copy link
Contributor

s1monw commented Mar 16, 2015

LGTM

bleskes added a commit that referenced this pull request Mar 17, 2015
This commit adds the current total number of translog operations to the recovery reporting API.  We also expose the recovered / total percentage:

```
"translog": {
     "recovered": 536,
     "total": 986,
     "percent": "54.3%",
     "total_time": "2ms",
     "total_time_in_millis": 2
},
```

Closes #9368
Closes #10042
bleskes added a commit that referenced this pull request Mar 17, 2015
This commit adds the current total number of translog operations to the recovery reporting API.  We also expose the recovered / total percentage:

```
"translog": {
     "recovered": 536,
     "total": 986,
     "percent": "54.3%",
     "total_time": "2ms",
     "total_time_in_millis": 2
},
```

Closes #9368
Closes #10042
@bleskes bleskes closed this in b605184 Mar 17, 2015
@bleskes bleskes deleted the recovery_translog_stats branch March 17, 2015 14:43
@clintongormley clintongormley added :Data Management/Stats Statistics tracking and retrieval APIs and removed review :Distributed/Recovery Anything around constructing a new shard, either from a local or a remote source. labels Mar 19, 2015
@pickypg pickypg mentioned this pull request Apr 10, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
This commit adds the current total number of translog operations to the recovery reporting API.  We also expose the recovered / total percentage:

```
"translog": {
     "recovered": 536,
     "total": 986,
     "percent": "54.3%",
     "total_time": "2ms",
     "total_time_in_millis": 2
},
```

Closes elastic#9368
Closes elastic#10042
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

5 participants