Think things through #1 |
返信 |
TIL |
Today I learned to think things through. More precisely, the necessity of learning to think things through was once again driven home.
An unconsidered edge case caused a bug -- the number of children a folder can have on Google Docs isn't limited, but in our server DB the field storing this (as a JSON list, which is another design crime I feel I'm gonna pay for), there was a character limit of 65,535.
Bandage, short-term solution? Change the field type from TEXT to LONGTEXT, for a 4-billion character limit, much less likely to be reached in common cases. (Arguably even the previous limit would be reached only rarely, but is possible for a few thousand files in a folder, so it wouldn't have been THAT uncommon...) Then fix the corrupted (truncated) data, thankfully only a couple of test folder rows.
投稿者 ceeifb | 返信 (0) | トラックバック (0)