Skip to content

Commit bd914cb

Browse files
Jinny-Wangjinnyatw
andauthored
[Engine] make Engine.Result#setTransLogLocation() setTook() freeze() … (#19275)
Make Engine.Result#setTransLogLocation(), setTook(), and freeze() public so that they can be called from plugins that implement a custom Engine. --------- Signed-off-by: jinnyw <[email protected]> Co-authored-by: jinnyw <[email protected]>
1 parent 3485432 commit bd914cb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2828
- Add CompletionStage variants to IndicesAdminClient as an alternative to ActionListener ([#19161](https://github.com/opensearch-project/OpenSearch/pull/19161))
2929
- Remove cap on Java version used by forbidden APIs ([#19163](https://github.com/opensearch-project/OpenSearch/pull/19163))
3030
- Disable pruning for `doc_values` for the wildcard field mapper ([#18568](https://github.com/opensearch-project/OpenSearch/pull/18568))
31+
- Make all methods in Engine.Result public ([#19276](https://github.com/opensearch-project/OpenSearch/pull/19275))
3132

3233
### Fixed
3334
- Fix unnecessary refreshes on update preparation failures ([#15261](https://github.com/opensearch-project/OpenSearch/issues/15261))

server/src/main/java/org/opensearch/index/engine/Engine.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,23 +561,23 @@ public Operation.TYPE getOperationType() {
561561
return operationType;
562562
}
563563

564-
void setTranslogLocation(Translog.Location translogLocation) {
564+
public void setTranslogLocation(Translog.Location translogLocation) {
565565
if (freeze.get() == null) {
566566
this.translogLocation = translogLocation;
567567
} else {
568568
throw new IllegalStateException("result is already frozen");
569569
}
570570
}
571571

572-
void setTook(long took) {
572+
public void setTook(long took) {
573573
if (freeze.get() == null) {
574574
this.took = took;
575575
} else {
576576
throw new IllegalStateException("result is already frozen");
577577
}
578578
}
579579

580-
void freeze() {
580+
public void freeze() {
581581
freeze.set(true);
582582
}
583583

0 commit comments

Comments
 (0)