microsoft / microsoft/multiclouddb-sdk-for-java
Normalize absolute TTL expiry 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(). During review, the proposed provider-specific TTL-preservation capability was removed because support by only one provider does not establish a useful portable contract.
Current behavior differs across the two participating providers:
- DynamoDB
UpdateItemleaves the existing absolutettlExpiryvalue unchanged. - Cosmos DB
patchItemadvances_ts, restarting a relative TTL countdown.
TTL timing is therefore explicitly outside the portable partial-update contract for now. Callers requiring a fixed absolute expiry must not use update() on TTL-bearing items.
Goal
Define and implement one portable absolute-expiry behavior across Cosmos DB and DynamoDB without silent provider divergence.
Design questions
- Can expiry preservation remain one native write with no pre-read or read/merge?
- Is SDK-owned absolute-expiry metadata required?
- How should ETag/concurrency races, RU/request cost, retries, and timeout ambiguity be handled?
- How should existing provider-native TTL fields and already-stored items migrate?
Acceptance criteria
- Cosmos DB and DynamoDB expose the same documented result for a partial update on a TTL-bearing item.
- Any unsupported case is rejected before provider I/O with a normalized error rather than silently diverging.
- Conformance coverage verifies absolute expiry before and after update on every participating provider.
- Capability declarations, API/SPI Javadocs, compatibility documentation, and cost implications are aligned.
- The chosen design documents whether the operation still performs one write with no pre-read.
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 MulticloudDbClient.update() contract, then compare the DynamoDB UpdateItem and Cosmos DB patchItem behavior described here. Resolve the design questions before changing the provider implementations. Done means both providers document and enforce the same TTL result, unsupported cases fail before provider I/O, conformance coverage verifies expiry, and capability, API/SPI, compatibility, and cost documentation agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, azure, java
- Domain
- backend-api-design, databases, documentation, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100