Skip to content

python sdk 4.3.5 collection.repalce issue #62

Closed
@Tan-Fei-Fei

Description

@Tan-Fei-Fei

replace(
key=new_data["id"],
value=new_data,
opts=ReplaceOptions(
# cas=old.cas, # This parameter does not work as expected (does not take effect) in Couchbase Python SDK 4.3.5
durability=ServerDurability(
level=DurabilityLevel.PERSIST_TO_MAJORITY
)
),
cas=old_cas, # This parameter works as expected (takes effect) in Couchbase Python SDK 4.3.5
)

Explanation:

In the Couchbase Python SDK 4.3.5, there is an issue where specifying the 'cas' parameter inside the ReplaceOptions object

(e.g., cas=old.cas) does not function correctly and does not take effect. However, passing the 'cas' parameter directly

to the replace function (outside of the ReplaceOptions object) works as intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions