Repository navigation
Conversation
infinispan#28) Roadmap Step 12. Adds the multi-key bulk operations to RemoteCache: - putAll(map<ByteArray,ByteArray>, lifespan, maxIdle) -> future<void> (0x2D/0x2E; shared expiration encoding identical to put()). - getAll(set<ByteArray>) -> future<map<ByteArray,ByteArray>> (0x2F/0x30; keys absent from the cache are omitted). Keys are partitioned by primary owner and one sub-request is sent per owner concurrently, then merged — mirroring the Java client's HotRodBulkOperation gatherOperations/reduce. groupKeysByConnection reuses the single-key router (selectServerForKey) per key, so HASH mode yields one group per owner and BASIC/no-topology collapses to a single request. Both ops are exposed on RetryView for the excluding() retry path. Error handling follows this client's D2 model (and diverges from Java): before send, a key whose owner is unreachable re-routes to a backup/proxy; after send, any sub-op failure fails the whole op (first error, triedNodes enriched across partitions, no partial results) and retry is user-decided via excluding(e) — Java instead auto-retries each partition up to maxRetries. BULK_GET is deferred: it is opcode 0x19 (not 0x1F, which is QUERY — the old roadmap note was wrong), is absent from the modern Java client, and is under-specified in hotrod40.ksy, so it needs the live wire format verified first. Tests: BulkOpsTest (unit wire-layout vectors); BulkOpsIntegrationTests (single server) and owner-partitioning + excluding() cases in HashAwareRoutingIntegrationTests (3-node cluster). Unit 284->294, integration 107->117 (24 suites). Docs: STATUS, DECISIONS, README, cache-operations guide. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
rigazilla
force-pushed
the
bulk-ops-step12
branch
from
December 4, 2026 07:34
2c2eb1b to
ef11544
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28. Roadmap Step 12 — multi-key bulk operations.
What
putAll(map<ByteArray,ByteArray>, lifespan, maxIdle) -> future<void>(0x2D/0x2E) — shared expiration, same encoding asput.getAll(set<ByteArray>) -> future<map<ByteArray,ByteArray>>(0x2F/0x30) — keys absent from the cache are omitted.RetryViewfor theexcluding()retry path.Owner partitioning (client-side scatter/gather)
Keys are grouped by primary owner and one sub-request is sent per owner concurrently, then merged — mirroring the Java client's
HotRodBulkOperation.gatherOperations/reduce.groupKeysByConnectionreuses the single-key router (selectServerForKey) per key, soHASH_DISTRIBUTION_AWAREyields one group per owner (inheriting exclusion / proxy / seed fallback) and BASIC / no-topology collapses to a single request.Error handling (follows D2; differs from Java)
triedNodesenriched across partitions, no partial results); retry is user-decided viaexcluding(e). Java auto-retries each partition up tomaxRetries— we intentionally do not (docs/ERROR_HANDLING_DESIGN.md).BULK_GET deferred
It is opcode 0x19→0x1A, not 0x1F (0x1F is QUERY — the old roadmap note was wrong), is absent from the modern Java client, and is under-specified in
hotrod40.ksy(bulk_get_response.chunkhas no key). GET_ALL covers "fetch many known keys"; BULK_GET needs the live wire format verified first.Tests
BulkOpsTest) — wire-layout vectors for putAll/getAll.BulkOpsIntegrationTests(single server: round-trip, missing-key omission, overwrite, empty set/map, non-default expiration, after-disconnect) + owner-partitioning andexcluding()re-route cases inHashAwareRoutingIntegrationTests(3-node cluster).Docs
STATUS, DECISIONS (incl. the superseding note that corrects an initial single-server-routing mistake), README, and the cache-operations guide updated in-commit.
🤖 Generated with Claude Code