-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Request Hedging Tool#47 implementation #49
base: main
Are you sure you want to change the base?
Conversation
Update logging levels
Logging pattern optimized for small size
- Add ddb.hedging.number config to control concurrent requests - Create MultiHedgingRequestHandler for parallel request handling - Integrate hedging support in request pipeline
- Added support for Netty Http client - MultiHedgingRequestHandler changes to use Netty eventloop.
Implemented the hedging demo using Java SDK 2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had very high level comments, I will add one of my colleagues to review this PR, In general I do think we need more documentation overall for the code. Specially since this will be used as a reference.
ddb-hedging/README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include one section that explains how does the sample table looks like and how you run the test as specified in ddb-hedging/src/test/java/com/dynamodbdemo/GenerateLoadTestData.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a readme that explains how to use this yml
file. It would be nice to include a sample execution in either video or gif.
|
||
private static final Logger logger = LoggerFactory.getLogger(DynamoDbConfig.class); | ||
|
||
@Value("${aws.dynamodb.region}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you add a validation?
@PostConstruct
public void validateConfiguration() {
Assert.isTrue(connectionTimeoutSeconds > 0, "Connection timeout must be positive");
Assert.isTrue(apiTimeoutSeconds > 0, "API timeout must be positive");
Assert.isTrue(maxConcurrency > 0, "Max concurrency must be positive");
Assert.hasText(region, "Region must not be empty");
}
@Bean(name = "DDBAsyncClient") | ||
@ConditionalOnProperty(name = "aws.dynamodb.use-crt-client", havingValue = "false") | ||
public DynamoDbAsyncClient getNettyDynamoDbAsyncClient(SdkEventLoopGroup eventLoopGroup) { | ||
if (dynamoDbAsyncClient == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a double-check but can you use the synchronized (xxx.class) {}
for extra thread safety? (there was another place, I believe at the logs as well).
Issue #47
Description:
This PR provides an DynamoDB request hedging functionality for AWS SDK for Java 2.x.
Key features:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.