[server] Add pre-write buffer memory metrics for primary key tables - #4308
Kaixuan-Duan wants to merge 1 commit into
Conversation
|
looks duplicate with #3533 |
I've looked at both #4308 and #3533. IMO, the way #4308 calculates actual memory usage reflects the true memory footprint — it factors in the real overhead of Java objects, which I believe is the correct approach. @zuston, do you still plan to move forward with #3533? If so, I'd suggest adjusting it to follow the approach taken in this PR. Additionally, I think the unified memory accounting introduced in #3751 should be incorporated into this PR. To be more specific: we need a truly accurate global memory usage ledger for KvPrewriteBuffer, maintained by atomic variables. Our future backpressure decisions will depend on it, and the current metrics should also be built on the same source of truth — rather than being the sum of non-atomic samples collected from multiple maps by the metrics framework. |
make sense, please go ahead @Kaixuan-Duan . And I will close the #3533 |
Purpose
Linked issue: close #4307
Brief change log
Tests
API and Format
Documentation