Open SR-mkuhn opened 9 years ago
Hi @SR-mkuhn
do you find this issue is really bad, or just a little "nice to have", in other words, did you notice a real database traffic increase due to this issue?
It is really bad, because there are cases, like #8307, where 16KB(and rising) are written multiple times in a second.
@SR-mkuhn we will fix #8307 with high priority, which hopefully makes this "inefficient session handler" less important bug. once #8307 will be fixed, if you still find this issue creates slowness in the db replication, please let me us know
I understand the convenience to store data this way, because it is similar to a filebased sessionstore. ;-) Until somebody finds a way to put arbitrary large data in this field. I think #8307 is just one known way to trigger this bug. And as the replication binlog just saves differences, a rewrite causes more traffic even if a change is minimal inside this field-datastructure.
If a value of the session is updated, the data field of piwik_session gets fully rewritten (it's a text blob) instead of simply updating the one value.
This text blob is already a data structure - but not a data structure mysql understands. This breaks mysql database replication binlog, because this change is logged there (to apply it to an other server) and causes higher database traffic as needed.