dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
25.29k stars 910 forks source link

Memory tracking for JSON data type #3661

Open kostasrim opened 1 week ago

kostasrim commented 1 week ago

Our tracking for JSON is buggy. First no matter the size of the json will always report 16 bytes per object. Second we don't track the internal memory used by Json objects.

The fix is simple but the pmr in jsoncons library is buggy as well.

I am creating this issue to:

  1. Track the bug/issue reported on jsoncons lib
  2. Once (1) is resolved merge my pr
kostasrim commented 1 week ago

https://github.com/danielaparker/jsoncons/issues/539

romange commented 1 week ago

@kostasrim if you happen to know how to fix the issue, we do not need to wait for Daniel to fix it in his repo - we use our own fork - https://github.com/dragonflydb/jsoncons/tree/Dragonfly which also btw is very much behind jsoncons.

  1. It could be that their latest release already fixes the issue
  2. we could also potentially patch Dragonfly with the fix. But if the fix is complicated - no need to spend too much time on it and we will patiently wait on it a few more months.
kostasrim commented 1 week ago
  1. I did not know we use our own fork
  2. Yes I think I can patch this fairly fast (which I will then send as a PR to them).