Skip to content

Commit 0c5ee15

Browse files
Jinny-Wangjinnyatw
andauthored
[Engine] change loadHistoryUUID to protected, and Origin#isFromTranslog() to public (#19752)
Signed-off-by: jinnyw <jinnyw@uber.com> Co-authored-by: jinnyw <jinnyw@uber.com>
1 parent 83cb686 commit 0c5ee15

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3333
- Refactor the IndexingStats.Stats class to use the Builder pattern instead of constructors ([#19306](https://github.com/opensearch-project/OpenSearch/pull/19306))
3434
- Remove FeatureFlag.MERGED_SEGMENT_WARMER_EXPERIMENTAL_FLAG. ([#19715](https://github.com/opensearch-project/OpenSearch/pull/19715))
3535
-
36+
- Make Engine#loadHistoryUUID() protected and Origin#isFromTranslog() public ([#19753](https://github.com/opensearch-project/OpenSearch/pull/19752))
37+
3638
### Fixed
3739
- Fix Allocation and Rebalance Constraints of WeightFunction are incorrectly reset ([#19012](https://github.com/opensearch-project/OpenSearch/pull/19012))
3840
- Fix flaky test FieldDataLoadingIT.testIndicesFieldDataCacheSizeSetting ([#19571](https://github.com/opensearch-project/OpenSearch/pull/19571))

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)