From a36de1b4e35e1301ee5e233efa1c456f24efc603 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 8 May 2015 12:32:26 -0400 Subject: [PATCH] Disable response metadata cache. This cache is only used for diagnostic purposes, but can force objects from every response to the old generation. Fixes #193 --- pom.xml | 2 +- .../cloud/aws/AwsEc2Service.java | 3 +++ .../cloud/aws/AmazonS3Wrapper.java | 20 +++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 50e11f782d7..a83e7988622 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ - 1.9.23 + 1.9.34 diff --git a/src/main/java/org/elasticsearch/cloud/aws/AwsEc2Service.java b/src/main/java/org/elasticsearch/cloud/aws/AwsEc2Service.java index 70f8e88def8..b5cd0f00140 100644 --- a/src/main/java/org/elasticsearch/cloud/aws/AwsEc2Service.java +++ b/src/main/java/org/elasticsearch/cloud/aws/AwsEc2Service.java @@ -62,6 +62,9 @@ public class AwsEc2Service extends AbstractLifecycleComponent { } ClientConfiguration clientConfiguration = new ClientConfiguration(); + // the response metadata cache is only there for diagnostics purposes, + // but can force objects from every response to the old generation. + clientConfiguration.setResponseMetadataCacheSize(0); String protocol = settings.get("cloud.aws.protocol", "https").toLowerCase(); protocol = settings.get("cloud.aws.ec2.protocol", protocol).toLowerCase(); if ("http".equals(protocol)) { diff --git a/src/test/java/org/elasticsearch/cloud/aws/AmazonS3Wrapper.java b/src/test/java/org/elasticsearch/cloud/aws/AmazonS3Wrapper.java index 33b14fefd66..ce071bc6e00 100644 --- a/src/test/java/org/elasticsearch/cloud/aws/AmazonS3Wrapper.java +++ b/src/test/java/org/elasticsearch/cloud/aws/AmazonS3Wrapper.java @@ -257,6 +257,26 @@ public class AmazonS3Wrapper implements AmazonS3 { delegate.deleteBucket(bucketName); } + @Override + public void setBucketReplicationConfiguration(String bucketName, BucketReplicationConfiguration configuration) throws AmazonServiceException, AmazonClientException { + delegate.setBucketReplicationConfiguration(bucketName, configuration); + } + + @Override + public void setBucketReplicationConfiguration(SetBucketReplicationConfigurationRequest setBucketReplicationConfigurationRequest) throws AmazonServiceException, AmazonClientException { + delegate.setBucketReplicationConfiguration(setBucketReplicationConfigurationRequest); + } + + @Override + public BucketReplicationConfiguration getBucketReplicationConfiguration(String bucketName) throws AmazonServiceException, AmazonClientException { + return delegate.getBucketReplicationConfiguration(bucketName); + } + + @Override + public void deleteBucketReplicationConfiguration(String bucketName) throws AmazonServiceException, AmazonClientException { + delegate.deleteBucketReplicationConfiguration(bucketName); + } + @Override public PutObjectResult putObject(PutObjectRequest putObjectRequest) throws AmazonClientException, AmazonServiceException { return delegate.putObject(putObjectRequest);