pulsar-client-cpp icon indicating copy to clipboard operation
pulsar-client-cpp copied to clipboard

[Bug] TableView's existing value will never update

Open BewareMyPower opened this issue 9 months ago • 0 comments

Search before asking

  • [x] I searched in the issues and found nothing similar.

Version

TableView uses SynchronizedHashMap#emplace to update a key-value:

https://github.com/apache/pulsar-client-cpp/blob/0e1ed3b2af24f5373036b839e4131257e8e75bf2/lib/TableViewImpl.cc#L107

https://github.com/apache/pulsar-client-cpp/blob/0e1ed3b2af24f5373036b839e4131257e8e75bf2/lib/SynchronizedHashMap.h#L58

However, the underlying emplace method does not update an existing key-value.

Minimal reproduce step

TBD

What did you expect to see?

TBD

What did you see instead?

TBD

Anything else?

No response

Are you willing to submit a PR?

  • [x] I'm willing to submit a PR!

BewareMyPower avatar Apr 30 '25 15:04 BewareMyPower