From 71e66dee70cbcadc0488382508fedd08d53f36ad Mon Sep 17 00:00:00 2001 From: Kartik Ganesh Date: Fri, 3 Jun 2022 10:10:17 -0700 Subject: [PATCH] Incorporating PR feedback on javadocs Signed-off-by: Kartik Ganesh --- .../src/main/java/org/opensearch/index/store/Store.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/index/store/Store.java b/server/src/main/java/org/opensearch/index/store/Store.java index 94a7e5dfd5bff..f818456c3a2c8 100644 --- a/server/src/main/java/org/opensearch/index/store/Store.java +++ b/server/src/main/java/org/opensearch/index/store/Store.java @@ -275,7 +275,7 @@ public MetadataSnapshot getMetadata(IndexCommit commit) throws IOException { } /** - * Conveience wrapper around the {@link #getMetadata(IndexCommit)} method for null input. + * Convenience wrapper around the {@link #getMetadata(IndexCommit)} method for null input. */ public MetadataSnapshot getMetadata() throws IOException { return getMetadata(null, false); @@ -322,6 +322,12 @@ public MetadataSnapshot getMetadata(IndexCommit commit, boolean lockDirectory) t } } + /** + * Returns a new {@link MetadataSnapshot} for the given {@link SegmentInfos} object. + * In contrast to {@link #getMetadata(IndexCommit)}, this method is useful for scenarios + * where we need to construct a MetadataSnapshot from an in-memory SegmentInfos object that + * may not have a IndexCommit associated with it, such as with segment replication. + */ public MetadataSnapshot getMetadata(SegmentInfos segmentInfos) throws IOException { return new MetadataSnapshot(segmentInfos, directory, logger); }