Skip to content

Commit 3cc022a

Browse files
committed
[Engine] change loadHistoryUUID to protected, and Origin#isFromTranslog() to public
Signed-off-by: jinnyw <jinnyw@uber.com>
1 parent c7503fc commit 3cc022a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2626
- Wrap checked exceptions in painless.DefBootstrap to support JDK-25 ([#19706](https://github.com/opensearch-project/OpenSearch/pull/19706))
2727
- Refactor the ThreadPoolStats.Stats class to use the Builder pattern instead of constructors ([#19317](https://github.com/opensearch-project/OpenSearch/pull/19317))
2828
- Refactor the IndexingStats.Stats class to use the Builder pattern instead of constructors ([#19306](https://github.com/opensearch-project/OpenSearch/pull/19306))
29+
- Make Engine#loadHistoryUUID() protected and Origin#isFromTranslog() public ([#19753](https://github.com/opensearch-project/OpenSearch/pull/19752))
2930

3031
### Fixed
3132
- Fix Allocation and Rebalance Constraints of WeightFunction are incorrectly reset ([#19012](https://github.com/opensearch-project/OpenSearch/pull/19012))

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public MergedSegmentTransferTracker getMergedSegmentTransferTracker() {
227227
/**
228228
* Reads the current stored history ID from commit data.
229229
*/
230-
String loadHistoryUUID(Map<String, String> commitData) {
230+
protected String loadHistoryUUID(Map<String, String> commitData) {
231231
final String uuid = commitData.get(HISTORY_UUID_KEY);
232232
if (uuid == null) {
233233
throw new IllegalStateException("commit doesn't contain history uuid");
@@ -1559,7 +1559,7 @@ public boolean isRecovery() {
15591559
return this == PEER_RECOVERY || this == LOCAL_TRANSLOG_RECOVERY;
15601560
}
15611561

1562-
boolean isFromTranslog() {
1562+
public boolean isFromTranslog() {
15631563
return this == LOCAL_TRANSLOG_RECOVERY || this == LOCAL_RESET;
15641564
}
15651565
}

0 commit comments

Comments
 (0)