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
[Slack Thread|https://mongodb.slack.com/archives/G0121N9LJ14/p1701307619466459] captured from #privategroup by [~kiro.morkos@mongodb.com]
[~kiro.morkos@mongodb.com]: Looking at a [HELP ticket|https://jira.mongodb.org/browse/HELP-52444?focusedCommentId=5914399&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-5914399] - this app is getting an error about a table name being too long during client reset, but not during normal bootstrap {"@t":"2023-11-29T16:27:43.2410074-06:00","@m":"Connection[2]: Session[5]: A fatal error occurred during client reset: 'class name too long (version: 0, last_integrated_remote_version: 0, origin_file_ident: 0, timestamp: 0). Please contact support.'","@l":"Error","SourceContext":"RealmSdk"}
It appears that <https://github.com/realm/realm-core/blob/bc487096035a25e4d80e9b81e17d912d004047dd/src/realm/sync/instruction_applier.cpp#L88-L94|this method>, which is only used during client reset, enforces a max length of 57 characters (i assume the -6 comes from class_), and the app does indeed have a table with 58 characters. any idea why the normal bootstrap allows this table name?
~jonathan.reams@mongodb.com: because by the time you're able to bootstrap you've already created all your tables/columns?
~jonathan.reams@mongodb.com: i don't know why that function is only used in client resets though
~jonathan.reams@mongodb.com: ah, the best kind of error.
[~kiro.morkos@mongodb.com]: ooooo wow 🤦 . that explains why a 58-character table name slips through the cracks 🙃
[~kiro.morkos@mongodb.com]: wait, that would still fail though? class_name.size() = 58 58 > 63 - 6 and 58 >= 63-6
in the other codepath name.size() = 64 64 > 63 <-- why is this okay? or does name not include class_ here either?
[~thomas.goyne@mongodb.com]: what 64 character long name do they have? the longest table name I can find in the logs attached to that ticket is class_FieldResultDoc_tableResults_tableResults_checkListOptions , which is 63
[Slack Thread|https://mongodb.slack.com/archives/G0121N9LJ14/p1701307619466459] captured from #privategroup by [~kiro.morkos@mongodb.com]
{"@t":"2023-11-29T16:27:43.2410074-06:00","@m":"Connection[2]: Session[5]: A fatal error occurred during client reset: 'class name too long (version: 0, last_integrated_remote_version: 0, origin_file_ident: 0, timestamp: 0). Please contact support.'","@l":"Error","SourceContext":"RealmSdk"}
It appears that <https://github.com/realm/realm-core/blob/bc487096035a25e4d80e9b81e17d912d004047dd/src/realm/sync/instruction_applier.cpp#L88-L94|this method>, which is only used during client reset, enforces a max length of 57 characters (i assume the -6 comes from
class_
), and the app does indeed have a table with 58 characters. any idea why the normal bootstrap allows this table name?realm-core/src/realm/group.cpp
Line 679 in bc48709
name
not include theclass_
prefix?class_name.size() > Group::max_table_name_length - 6
class_name.size() = 58
58 > 63 - 6
and58 >= 63-6
in the other codepath
name.size() = 64
64 > 63
<-- why is this okay? or doesname
not includeclass_
here either?class_FieldResultDoc_tableResults_tableResults_checkListOptions
, which is 63The text was updated successfully, but these errors were encountered: