Skip to content

Conversation

@sapk
Copy link
Contributor

@sapk sapk commented Dec 1, 2025

This PR add atomic counter operations support for Couchbase processor.

This is backward compatible as they are new operations.

Note: This might conflict with #2709 but I can rebase over the first to be merged.

@CLAassistant
Copy link

CLAassistant commented Dec 1, 2025

CLA assistant check
All committers have signed the CLA.

@sapk sapk force-pushed the couchbase-add-counter-op branch from 334e332 to 424f811 Compare December 1, 2025 21:43
@sapk sapk force-pushed the couchbase-add-counter-op branch from 424f811 to 11e4110 Compare December 1, 2025 21:45
@sapk
Copy link
Contributor Author

sapk commented Dec 10, 2025

I updated the PR to have the ttl support also on increment and decrement operations since #3825 was merged.

I also change to require and enforce that content is a valid integer. Previously any invalid or empty value set the delta to zero meaning a noop but it had the bad design of silencing error.
If wanted we can set and document a default value for delta if content is empty. Either 1 to increment or decrement by 1 by default or 0 to be an noop by default (simply retrieve the existing value).

Also I simply return the error in process batch but maybe I could be more subtle and attach the error on the message and skip adding it to the ops list.

@peczenyj
Copy link
Contributor

At least this feature is available in the other implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants