Skip to content

Commit

Permalink
Set up serverless network policy before setting up index (#4250)
Browse files Browse the repository at this point in the history
Signed-off-by: Hai Yan <[email protected]>
  • Loading branch information
oeyh authored Mar 8, 2024
1 parent ed1431d commit 4d60adf
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ private void doInitializeInternal() throws IOException {
.add(pluginSetting.getName()).toString());
dlqWriter = potentialDlq.isPresent() ? potentialDlq.get() : null;
}

// Attempt to update the serverless network policy if required argument are given.
maybeUpdateServerlessNetworkPolicy();

indexManager.setupIndex();

final Boolean requireAlias = indexManager.isIndexAlias(configuredIndexAlias);
Expand Down Expand Up @@ -257,9 +261,6 @@ private void doInitializeInternal() throws IOException {
bulkRequestSupplier,
pluginSetting);

// Attempt to update the serverless network policy if required argument are given.
maybeUpdateServerlessNetworkPolicy();

objectMapper = new ObjectMapper();
this.initialized = true;
LOG.info("Initialized OpenSearch sink");
Expand Down

0 comments on commit 4d60adf

Please sign in to comment.