Skip to content

CLIENT-5039 Fix ListExp.appendItems with a Map element throws PARAMETER_ERROR#622

Open
mirzakaracic wants to merge 4 commits into
stage-jdk8from
CLIENT-5039_jdk8
Open

CLIENT-5039 Fix ListExp.appendItems with a Map element throws PARAMETER_ERROR#622
mirzakaracic wants to merge 4 commits into
stage-jdk8from
CLIENT-5039_jdk8

Conversation

@mirzakaracic

Copy link
Copy Markdown
Collaborator

No description provided.

…ervers with AER-6930 (8.1.2.3+) accept them.

Server change AER-6930 validates list/map value literals in filter
expressions by re-canonicalizing them and requiring byte-identical input.
Canonical form packs map keys sorted in msgpack_cmp order with the order
flag header preserved, so unordered multi-key maps packed in HashMap
iteration order were rejected with PARAMETER_ERROR.

Exp list/map value literals now pack unordered maps at any depth with
entries sorted by key in the server's canonical msgpack order, without
adding an order flag header. Non-expression packing paths (record writes,
CDT operation arguments) are unchanged.
Packed map size is independent of entry order, so the estimate pass uses
the plain packMap body. Key serialization, sorting and the duplicate-key
check now run once per map literal instead of twice, and the estimate
pass allocates nothing. Also reuse the two msgpack comparator instances
across the sort instead of allocating two per comparison.
…acker.

The jdk8 Packer has no size-estimate pass: the constructor takes the
shared thread-local buffer and packs in a single pass, growing through
resize()/toByteArray(). Pack canonical map keys through private-buffer
packers instead of the estimate/createBuffer/write cycle, which would
have clobbered the outer packer's thread-local buffer, and drop the
jdk21-only estimate-pass (buffer != null) guards.
…in the jdk8 adaptation.

They predate the port and are used by the top-level estimate-then-write
packing in Exp, CdtExp and CdtOperation.
@mirzakaracic mirzakaracic requested a review from BrianNichols July 7, 2026 23:11
@mirzakaracic mirzakaracic self-assigned this Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Test Results (gnu / 8.1.1.0_1)

449 tests   393 ✅  43s ⏱️
  1 suites   56 💤
  1 files      0 ❌

Results for commit 5236bf2.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Test Results (bouncycastle / 8.1.0.3_2)

449 tests   310 ✅  42s ⏱️
  1 suites  137 💤
  1 files      0 ❌  2 🔥

For more details on these errors, see this check.

Results for commit 5236bf2.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Test Results (gnu / 8.1.0.3_2)

449 tests   310 ✅  42s ⏱️
  1 suites  137 💤
  1 files      0 ❌  2 🔥

For more details on these errors, see this check.

Results for commit 5236bf2.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Test Results (bouncycastle / 8.1.1.0_1)

449 tests   393 ✅  42s ⏱️
  1 suites   56 💤
  1 files      0 ❌

Results for commit 5236bf2.

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