microsoft / microsoft/multiclouddb-sdk-for-java
Define portable resulting-document size semantics for partial update
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7
- Forks
- 7
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 1
Description
Context
PR #105 adds portable shallow partial update through MulticloudDbClient.update(). The portable contract currently covers a resulting logical document only when both serialized JSON and portable structural footprint are at most 390 KiB.
The resulting size depends on existing stored state, while the operation intentionally performs one native write with no pre-read/read-merge. Native ceilings also differ: DynamoDB limits an item to 400 KiB, while Cosmos DB permits a larger item. The proposed provider-specific extended-size capability was removed during review because support by only one provider does not establish a useful portable contract.
Results above either portable bound are therefore outside the contract and may succeed or fail according to native provider limits. Native rejections remain normalized with stable reason and limit details.
Goal
Define a portable, cost-explicit contract for state-dependent partial-update result size across Cosmos DB and DynamoDB.
Design questions
- Can a common resulting-size limit be enforced without a pre-read?
- If a pre-read or stored size metadata is required, how are extra cost, latency, concurrency races, ETags, and retries handled?
- Should over-limit behavior reject before I/O, fail after one attempted write, or use another provider-neutral mechanism?
- Which serialized and structural measurements are normative for existing plus replacement fields?
Acceptance criteria
- Cosmos DB and DynamoDB produce the same documented outcome at, below, and above the portable resulting-document boundary.
- The design prevents silent provider divergence and does not introduce a single-provider capability.
- Error category, retryability, stable reason, measured size, and native limit details are normalized and tested.
- Conformance tests cover boundary and state-dependent over-limit cases for every participating provider.
- API/SPI Javadocs, capability declarations, compatibility documentation, and request/cost implications are aligned.
- The design explicitly states whether the operation retains one-write/no-read behavior.
Related: #105
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading PR #105 and the portable update() contract, then review the API/SPI Javadocs, capability declarations, compatibility documentation, and existing Cosmos DB and DynamoDB conformance tests. The work is done when the provider-neutral size semantics, cost and I/O behavior, normalized errors, and boundary cases are documented and tested consistently for both providers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100