You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tiago encountered a very tricky bug when working with the legacy git backend proposal data (#1632). It caused us quite a bit of headaches, so I'm documenting it here for future reference. It appears to only impact mac users. This is not a politeia bug.
When running mariadb on a mac, the results returned from a select query were dependant on the size of the select statement. These are the results that were returned for the exact same keys, but using different sized select statements. The query that was run was to retrieve the key-value store entries for 14,440 proposal votes.
When querying the entries individually, all entries were found.
When querying the entries using select statements that contained 10 placeholders each, all entries were found.
When querying the entries using select statements that contained 1000 placeholders each, 400 out of 14,440 entries were found.
When querying the entries using a single select statement with 14,440 placeholders, 0 out of the 14,440 entries were found.
b7f8a71 set a limit on the maximum number of placeholders that a select statement can contain based on the maximum allowed by MySQL. A workaround for this bug was to update this variable only allow 10 placeholders per select statement.
This bug was not encountered until recently because mainnet proposals with thousands of votes are the only time where these large select statements are going to be used and this issue appears to only be present on macs.
The text was updated successfully, but these errors were encountered:
tiago encountered a very tricky bug when working with the legacy git backend proposal data (#1632). It caused us quite a bit of headaches, so I'm documenting it here for future reference. It appears to only impact mac users. This is not a politeia bug.
When running mariadb on a mac, the results returned from a select query were dependant on the size of the select statement. These are the results that were returned for the exact same keys, but using different sized select statements. The query that was run was to retrieve the key-value store entries for 14,440 proposal votes.
b7f8a71 set a limit on the maximum number of placeholders that a select statement can contain based on the maximum allowed by MySQL. A workaround for this bug was to update this variable only allow 10 placeholders per select statement.
This bug was not encountered until recently because mainnet proposals with thousands of votes are the only time where these large select statements are going to be used and this issue appears to only be present on macs.
The text was updated successfully, but these errors were encountered: