-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Implementing Delete PIT service layer changes #3949
Implementing Delete PIT service layer changes #3949
Conversation
Signed-off-by: Bharathwaj G <[email protected]>
Signed-off-by: Bharathwaj G <[email protected]>
Signed-off-by: Bharathwaj G <[email protected]>
Signed-off-by: Bharathwaj G <[email protected]>
…ch into deletepitservice
Signed-off-by: Bharathwaj G <[email protected]>
Signed-off-by: Bharathwaj G <[email protected]>
Signed-off-by: Bharathwaj G <[email protected]>
… into createpitservice
Signed-off-by: Bharathwaj G <[email protected]>
Signed-off-by: Bharathwaj G <[email protected]>
…ch into deletepitservice
Signed-off-by: Bharathwaj G <[email protected]>
…ch into deletepitservice
Signed-off-by: Bharathwaj G <[email protected]>
a309113
to
41d342d
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
/cc: @sachinpkale |
We use squash and merge while merging the PRs. In such cases, PR title becomes commit message in |
/** | ||
* @return Whether the attempt to delete PIT was successful. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Extra line
|
||
@Override | ||
public RestStatus status() { | ||
if (deletePitResults.isEmpty()) return NOT_FOUND; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the status if PIT ID exists but we are not able to delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Succeeded would be false for the PIT ID deletion failures as given in PR description. Status is still 200.
@@ -45,12 +45,12 @@ | |||
* | |||
* @opensearch.internal | |||
*/ | |||
final class SearchContextIdForNode implements Writeable { | |||
public final class SearchContextIdForNode implements Writeable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeat comment: Why is this made public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -50,6 +51,7 @@ public TransportCreatePitAction( | |||
ClusterService clusterService, | |||
TransportSearchAction transportSearchAction, | |||
NamedWriteableRegistry namedWriteableRegistry, | |||
PitService pitService, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PitService
is not used in this class, right?
Signed-off-by: Bharathwaj G <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #3949 +/- ##
============================================
- Coverage 70.54% 70.53% -0.02%
- Complexity 56798 56837 +39
============================================
Files 4573 4579 +6
Lines 273476 273768 +292
Branches 40101 40141 +40
============================================
+ Hits 192925 193092 +167
- Misses 64301 64368 +67
- Partials 16250 16308 +58
Help us with your feedback. Take ten seconds to tell us how you rate us. |
Gradle Check (Jenkins) Run Completed with:
|
e36c60a
to
595afcd
Compare
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Bharathwaj G <[email protected]>
595afcd
to
717cd66
Compare
Gradle Check (Jenkins) Run Completed with:
|
.filter(r -> !r.isSuccessful()) | ||
.forEach(r -> failedPitsStringBuilder.append(r.getPitId()).append(",")); | ||
logger.warn(() -> new ParameterizedMessage("Failed to delete PIT IDs {}", failedPitsStringBuilder.toString())); | ||
if (!logger.isDebugEnabled()) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: put this inside the if block instead of negating it and returning early
|
||
@Override | ||
public void onFailure(final Exception e) { | ||
logger.error("Delete PITs failed", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we log more info on which PITs or how many failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This onFailure is never called in our flow, during connection failures or during delete pit failures, we mark the associated pit ids 'isSucceeded' as false, which gives info that deletion failed.
This will only be executed when there is an unhandled exception and doubt we have context on pits at that point.
client().admin().indices().prepareDelete("index1").get(); | ||
} | ||
|
||
public void testDeleteWhileSearch() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add more concurrent tests to ensure all failure cases around grouped listener is covered
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Bharathwaj G <[email protected]>
31668b2
to
f4db20b
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Bharathwaj G <[email protected]>
38313f4
to
3f08013
Compare
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Bharathwaj G <[email protected]>
… into deletepitservice
Gradle Check (Jenkins) Run Completed with:
|
…ch into deletepitservice
6192349
to
ae618ff
Compare
Gradle Check (Jenkins) Run Completed with:
|
Description
Delete point in time changes - merging the service layer changes as part of this PR and Rest changes will come in as part of separate PR.
Reference PR - Already reviewed delete PIT API PR in feature branch ->
#3401
Request:
Response:
Issues Resolved
#1147
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.