@SR-mkuhn opened this Issue on July 9th 2015

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.

@mattab commented on July 15th 2015 Owner

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?

@SR-mkuhn commented on July 16th 2015

It is really bad, because there are cases, like #8307, where 16KB(and rising) are written multiple times in a second.

@mattab commented on July 16th 2015 Owner

@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

@SR-mkuhn commented on July 16th 2015

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.

Powered by GitHub Issue Mirror