Skip to content

Update alternator load-balancing from 1.0.0 to 2.0.1#286

Open
dkropachev wants to merge 6 commits intomasterfrom
update-load-balancing-1.0.4
Open

Update alternator load-balancing from 1.0.0 to 2.0.1#286
dkropachev wants to merge 6 commits intomasterfrom
update-load-balancing-1.0.4

Conversation

@dkropachev
Copy link
Contributor

@dkropachev dkropachev commented Feb 24, 2026

Summary

  • Bump com.scylladb.alternator:load-balancing from 1.0.0 to 2.0.1
  • Use the public AlternatorDynamoDbClient.builder() API instead of internal AlternatorLiveNodes + BasicQueryPlanInterceptor
  • Use AlternatorDynamoDbClient.builder() in buildDynamoClient to add load balancing to table management, delete, and stream replication operations (not just Hadoop bulk I/O)
  • Support anonymous credentials (no credentials configured) for Alternator
  • Add Alternator-specific client configuration via optional alternator YAML section:
    • datacenter / rack: DC and rack-aware routing with automatic fallback
    • activeRefreshIntervalMs / idleRefreshIntervalMs: node list refresh tuning
    • compression: GZIP compression of request bodies
    • optimizeHeaders: reduce HTTP header overhead
  • Settings apply to all data paths: direct SDK (deletes, stream replication, DDL) and Hadoop-based (bulk scan/write)

Test plan

  • Verify the project compiles with the updated dependency
  • Run existing integration tests
  • Test with alternator section omitted (backward compatibility)
  • Test with alternator section present

@dkropachev dkropachev changed the title Update alternator load-balancing from 1.0.0 to 1.0.4 Update alternator load-balancing from 1.0.0 to 2.0.1 Feb 25, 2026
@dkropachev dkropachev force-pushed the update-load-balancing-1.0.4 branch 5 times, most recently from bcaac7b to 83c1dd3 Compare February 25, 2026 12:03
@dkropachev dkropachev marked this pull request as draft February 25, 2026 14:57
@dkropachev dkropachev force-pushed the update-load-balancing-1.0.4 branch from 83c1dd3 to bd3e0b0 Compare February 25, 2026 19:48
dkropachev and others added 3 commits February 26, 2026 18:17
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace usage of internal AlternatorLiveNodes and BasicQueryPlanInterceptor
with the public AlternatorDynamoDbClient.builder() API from load-balancing
2.0.1. This builder implements DynamoDbClientBuilder and handles load
balancing internally. Also use it in buildDynamoClient to add load balancing
to table management operations (create/describe/stream).
Expose AlternatorDynamoDbClient.builder() settings through the migrator
YAML config under an optional 'alternator' section for both source and
target DynamoDB settings:

- datacenter/rack: DC and rack-aware routing with fallback chain
- activeRefreshIntervalMs/idleRefreshIntervalMs: node list refresh tuning
- compression: GZIP compression of request bodies
- optimizeHeaders: reduce HTTP header overhead

Settings are applied to both direct SDK client paths (deletes, stream
replication, table management) and Hadoop-based bulk I/O paths (scan,
batch write) via Hadoop config passthrough.

Alternator with no credentials is supported - the builder defaults to
anonymous access when no credentials are configured.
@dkropachev dkropachev force-pushed the update-load-balancing-1.0.4 branch from bd3e0b0 to b375f5c Compare February 26, 2026 22:17
dkropachev and others added 3 commits February 26, 2026 18:32
The load-balancing 2.0.1 library is compiled for Java 11 (class file
version 55.0). Update CI workflows to use Java 11 while keeping the
compilation target at Java 8 for maximum compatibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…WSCredentials.toProvider

Replace null routing scope sentinel with idiomatic Option pattern in
applyAlternatorSettings, and reuse the existing AWSCredentials.toProvider
helper in AlternatorLoadBalancingEnabler to eliminate credential
reconstruction duplication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dkropachev dkropachev force-pushed the update-load-balancing-1.0.4 branch from b375f5c to f7fd030 Compare February 26, 2026 22:33
@dkropachev dkropachev marked this pull request as ready for review February 27, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant