Skip to content

Conversation

@mtmk
Copy link
Member

@mtmk mtmk commented Sep 16, 2025

This pull request fixes the handling of object metadata renaming in the NATS Object Store by ensuring that when an object's name is changed, the old metadata record is properly purged. It also adds a comprehensive test to verify this behavior.

Object metadata renaming and cleanup:

  • Updated UpdateMetaAsync in NatsObjStore.cs to purge the old metadata record if the object's name is changed, preventing stale metadata from lingering after a rename.

Testing and verification:

  • Added a new test Rename_object_should_perge_old_named_meta in ObjectStoreTest.cs to verify that renaming an object correctly purges the old metadata, updates the stream as expected, and ensures the object can only be accessed by the new name.

Related

@mtmk mtmk marked this pull request as ready for review September 16, 2025 08:14
@mtmk mtmk requested a review from scottf September 16, 2025 08:15
Copy link
Contributor

@scottf scottf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mtmk mtmk merged commit 23b12cf into main Sep 17, 2025
20 of 21 checks passed
@mtmk mtmk deleted the fix-obj-store-rename branch September 17, 2025 12:08
mtmk added a commit that referenced this pull request Sep 17, 2025
* Fix Object Store Rename (#954)
* Add support for initial connection retry (#928)
* Fix BackoffWithJitter extension (#929)
* Reduce log noise unregistered inbox messages (#949)
* Add server version check test util (#947)
* Update ClusterInfo with new 2.12 Fields (#945)
@mtmk mtmk mentioned this pull request Sep 17, 2025
mtmk added a commit that referenced this pull request Sep 17, 2025
* Fix Object Store Rename (#954)
* Add support for initial connection retry (#928)
* Fix BackoffWithJitter extension (#929)
* Reduce log noise unregistered inbox messages (#949)
* Add server version check test util (#947)
* Update ClusterInfo with new 2.12 Fields (#945)
@mtmk mtmk mentioned this pull request Sep 22, 2025
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.

Object Store Updating Metadata with New Name - Failure to Remove Old Subject

3 participants