Non-consistent data with PHP SDK

Hello there, implementing system based on microservices architecture with couchbase with 2 server cluster as data storage and i got very strange behavior during my queries

there is 3 worker running on AMPQ queue: lets name it starter, runner, finisher. Starter create task as document with subtasks info in it, runner work on them and update subtasks status, and finisher check for subtask status and notify other part of the system when all subtasks is done.

when i wrote subtask status updates to couchbase document i see how cas and document content changes:

[cas] => b8uxrpukb30g
[values] => Array ()

[cas] => b8uxrsqemj28
[values] => Array ()

[cas] => b8uxrtcnzim8
[values] => Array ()

And see progress of update trough web interface to db, document is updated, everything ok.

But in finisher when i try to load document to check it’s subtask status i constantly got outdated value

[cas] => b8uxrpukb30g
[values] => Array ()

[cas] => b8uxrpukb30g
[values] => Array ()

[cas] => b8uxrpukb30g
[values] => Array ()

So task never get completed.

Can you explain what Im doing wrong and how to fix this?

What server and client versions are you using?

Do you mean that when you upsert value in one process, in other process you are getting different value?

Is it possible to extract minimal example, to demonstrate the issue?

Oh sorry, we found a bug in ampq querries orchestration, it’s not related to couchbase, value was overwritten elsewhere, couchbase perform correctly

Btw Greeting from Minsk, great to know that Belarusian people work on such great product as Couchbase

1 Like

You are welcome, don’t hesitate to ask question about PHP SDK here. I’m maintaining it at the moment. Also you can report issues at our tracker at https://issues.couchbase.com/projects/PCBC/issues