Skip to content

[AutoPR armconsumption] Lots API Description Update#5

Closed
azure-sdk wants to merge 1 commit into
mainfrom
sdkAuto/18611/armconsumption
Closed

[AutoPR armconsumption] Lots API Description Update#5
azure-sdk wants to merge 1 commit into
mainfrom
sdkAuto/18611/armconsumption

Conversation

@azure-sdk
Copy link
Copy Markdown
Owner

Merge 9480276363465408fd18ab70a21486ecf90e8660 into b52f90085693d0ec65f751e30c65c3a878c340ea
@azure-sdk azure-sdk closed this Apr 25, 2022
@azure-sdk azure-sdk deleted the sdkAuto/18611/armconsumption branch October 19, 2023 18:03
azure-sdk-automation Bot pushed a commit that referenced this pull request May 14, 2026
* add container cache and pk range cache

* deadlock fix

* refresh with replaceContainer too, validate refreshes

* fix err handling

* fmt

* fix v2 hashing logic

* internal

* epk routing for HPK, dual-indexing container cache

* go fmt

* make rid based, change undefined pk behavior

* Update cosmos_container_properties_cache.go

* rename tests

* Address PR review comments: fix deadlock, test names, EPK comparison

- Fix lock-order inversion in containerPropertiesCache: extract
  updateRIDIndex() helper, ensure c.mu is never acquired while
  holding entry.mu (fixes #3 and #6)
- Rename misleading test names to match actual behavior (#4 and #5)
- Use epk.CompareEPK in isCompleteSetOfRanges for length-aware
  HPK boundary comparison (#1)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fixes from reviews

* more fixes from copilot review

* add test to verify cache is always used

* Update cosmos_container.go

* directly add cache to unit tests

* invalidate pk range cache on container recreate

* Update cosmos_container_properties_cache.go

* add full refresh tests

* 410 tests

* fix: resolve pkDef inside retry loop and add nil guard for container cache

Move PartitionKeyDefinition resolution inside the 410 retry loop so that
after a cache invalidation (container deleted and recreated with a
different partition key schema), the new pkDef is picked up — not just
the new partition key ranges.

Add nil guard in containerPropertiesCache.refreshEntry() to return an
error instead of caching nil properties, which would cause a nil pointer
panic in callers that dereference ContainerProperties.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* share caches among clients to same endpoint

* additional tests

* fix race conditions

* add normalization

* Update CHANGELOG.md

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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