Skip to content

Commit

Permalink
org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.testRequest…
Browse files Browse the repository at this point in the history
…Stats fails with NullPointerException (#13814)

It's a NullPointerException from S3BlobStore.extendedStats() method, where 'genericStatsMetricPublisher' is null. This parameter sets through S3Repository constructor from test and in this test it sets as null. This is the root cause of the issue. If we set valid a GenericStatsMetricPublisher, test works fine without any issue. This was a consistent failure, not a random failure.

Resolves #10735

Signed-off-by: akolarkunnu <abdul.kolarkunnu@netapp.com>
Co-authored-by: akolarkunnu <abdul.kolarkunnu@netapp.com>
  • Loading branch information
akolarkunnu and akolarkunnu authored May 25, 2024
1 parent 56d8dc6 commit 5cde176
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ protected Settings nodeSettings(int nodeOrdinal) {
return builder.build();
}

@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/10735")
@Override
public void testRequestStats() throws Exception {
final String repository = createRepository(randomName());
Expand Down Expand Up @@ -249,6 +248,8 @@ protected S3Repository createRepository(
ClusterService clusterService,
RecoverySettings recoverySettings
) {
GenericStatsMetricPublisher genericStatsMetricPublisher = new GenericStatsMetricPublisher(10000L, 10, 10000L, 10);

return new S3Repository(
metadata,
registry,
Expand All @@ -263,7 +264,7 @@ protected S3Repository createRepository(
false,
null,
null,
null
genericStatsMetricPublisher
) {

@Override
Expand Down

0 comments on commit 5cde176

Please sign in to comment.