infinyon / fluvio

Lean and mean distributed stream processing system written in rust and web assembly. Alternative to Kafka + Flink in one.
https://www.fluvio.io/
Apache License 2.0
3.79k stars 500 forks source link

chore: remove rwlock upgradable #4171

Closed fraidev closed 2 weeks ago

fraidev commented 3 weeks ago

This week, I read this Blog Post about: Upgradable parking_lot::RwLock might not be what you expect.

Basically, saying that RwLockUpgradableReadGuard does something that most of the people don't expect. It updates the lock field to write, not only for the actual usage before been dropped.

Then, I found a usage of it in get_store of local store metadata. A method that is called a lot, and only the first time it was called as read, all the next times were being called as write!

fraidev commented 2 weeks ago

https://github.com/infinyon/fluvio/pull/4175 should cover it better