Skip to content

Commit 73977fd

Browse files
committed
feat: Return bool from AsyncFeatureStore.delete and gate stale-delete notifications
1 parent 061ba89 commit 73977fd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ldclient/interfaces.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ async def upsert(self, kind: VersionedDataKind, item: dict) -> bool:
391391
"""
392392

393393
@abstractmethod
394-
async def delete(self, kind: VersionedDataKind, key: str, version: int) -> None:
394+
async def delete(self, kind: VersionedDataKind, key: str, version: int) -> bool:
395395
"""
396396
Deletes the object associated with the specified key, if it exists and its version is less
397397
than the specified version. The object should be replaced in the data store by a
@@ -400,6 +400,8 @@ async def delete(self, kind: VersionedDataKind, key: str, version: int) -> None:
400400
:param kind: The kind of object to delete
401401
:param key: The key of the object to be deleted
402402
:param version: The version for the delete operation
403+
:return: True if the store was updated (a newer delete placeholder was written); False if the
404+
delete was rejected because the stored version was equal or newer
403405
"""
404406

405407
@property

0 commit comments

Comments
 (0)