Page MenuHomePhabricator

Add debug code to make details of UID collisions more obvious
Open, HighPublic

Description

E.g. full row with UIDs in hex.

Possibly also query for and output row it's colliding with.

Event Timeline

On Beta, inserting Mention e.g.

test  @ET1

suddenly got

[3493f303] Exception Caught: JSON encoding failed: Malformed UTF-8 characters, possibly incorrectly encoded. Encoding: array ( '@timestamp' => '2015-11-10T19:29:04.000000+00:00', '@version' => 1, 'host' => 'deployment-mediawiki02', 'message' => 'Flow\\Data\\Storage\\RevisionStorage::insert	10.68.16.193	1062	Duplicate entry \'\\x05C\\xCB{\\xDEj\\xD2\\xDD\\xB4ik\' for key \'flow_revision_unique_parent\' (10.68.16.193)	INSERT INTO `flow_revision` (rev_id,rev_user_id,rev_user_ip,rev_user_wiki,rev_parent_id,rev_change_type,rev_type,rev_type_id,rev_content,rev_flags,rev_mod_state,rev_mod_user_id,rev_mod_user_ip,rev_mod_user_wiki,rev_mod_timestamp,rev_mod_reason,rev_last_edit_id,rev_edit_user_id,rev_edit_user_ip,rev_edit_user_wiki,rev_content_length,rev_previous_content_length) VALUES (\'�C�}�2�ݴik\',\'4462\',NULL,\'enwiki\',\'�C�{�j�ݴik\',\'edit-post\',\'post\',\'�C�{�j�ݴik\',\'eP�N�0��f<�\\n��\\0�\\\'�a<l8�Kwm(дC����)�vդ�N�u�{}��5�^[t��u������},o�d,�j���< �y����~���ڑ���eU̡���a��f������̹�����������z����}���������v\\\\�Б�G��j�AR�r��(t#Wx2��:\\n^$|8u��MT���%>������F�X&03���y�1<dQ���P8e�O��F?���4r�x�ʥaW�&�r8�~G�7!O��j�U5[��c�q��	����w�a�E���\',\'utf-8,gzip,html\',\'\',NULL,NULL,NULL,NULL,NULL,\'�C�}�2�ݴik\',\'4462\',NULL,\'enwiki\',\'25\',\'4\')', 'type' => 'mediawiki', 'channel' => 'wfLogDBError', 'level' => 'ERROR', 'url' => '/w/api.php', 'ip' => '10.68.18.103', 'http_method' => 'POST', 'server' => 'en.wikipedia.beta.wmflabs.org', 'referrer' => 'http://en.wikipedia.beta.wmflabs.org/wiki/Talk:ET19', 'uid' => '0ccdd9e', 'process_id' => 15217, 'wiki' => 'enwiki', 'db_server' => '10.68.16.193', 'db_name' => 'enwiki', 'db_user' => 'wikiadmin', 'method' => 'DatabaseBase::reportQueryError', 'errno' => 1062, 'error' => 'Duplicate entry \'\\x05C\\xCB{\\xDEj\\xD2\\xDD\\xB4ik\' for key \'flow_revision_unique_parent\' (10.68.16.193)', 'sql1line' => 'INSERT INTO `flow_revision` (rev_id,rev_user_id,rev_user_ip,rev_user_wiki,rev_parent_id,rev_change_type,rev_type,rev_type_id,rev_content,rev_flags,rev_mod_state,rev_mod_user_id,rev_mod_user_ip,rev_mod_user_wiki,rev_mod_timestamp,rev_mod_reason,rev_last_edit_id,rev_edit_user_id,rev_edit_user_ip,rev_edit_user_wiki,rev_content_length,rev_previous_content_length) VALUES (\'�C�}�2�ݴik\',\'4462\',NULL,\'enwiki\',\'�C�{�j�ݴik\',\'edit-post\',\'post\',\'�C�{�j�ݴik\',\'eP�N�0��f<�\\n��\\0�\\\'�a<l8�Kwm(дC����)�vդ�N�u�{}��5�^[t��u������},o�d,�j���< �y����~���ڑ���eU̡���a��f������̹�����������z����}���������v\\\\�Б�G��j�AR�r��(t#Wx2��:\\n^$|8u��MT���%>������F�X&03���y�1<dQ���P8e�O��F?���4r�x�ʥaW�&�r8�~G�7!O��j�U5[��c�q��	����w�a�E���\',\'utf-8,gzip,html\',\'\',NULL,NULL,NULL,NULL,NULL,\'�C�}�2�ݴik\',\'4462\',NULL,\'enwiki\',\'25\',\'4\')', 'fname' => 'Flow\\Data\\Storage\\RevisionStorage::insert', )

The Console displayed:
Uncaught TypeError: Cannot read property 'commandRegistry' of null

Uncaught TypeError: Cannot read property 'sequenceRegistry' of null