cardano-db-sync
cardano-db-sync copied to clipboard
1421 update logs for Unicode Nul character
Description
this fixes #1421
The logs were false in that not the whole row was drop, but instead if parsing failed with a Unicode Nul character the specific column it was intended for is recorded as nul.
This also effected a couple of other places so those were updated too.
[db-sync-node:Warning:75] [2024-01-31 11:02:29.12 UTC] prepareTxMetadata: Column 'json' in table 'metadata' was recorded as null, due to a Unicode NUL character found when trying to parse the json.
This also fixes #1623 as outputting the full json made logs quite perplexing.
Checklist
- [ ] Commit sequence broadly makes sense
- [ ] Commits have useful messages
- [ ] New tests are added if needed and existing tests are updated
- [ ] Any changes are noted in the changelog
- [ ] Code is formatted with
fourmoluon version 0.10.1.0 (which can be run withscripts/fourmolize.sh) - [ ] Self-reviewed the diff
Migrations
- [ ] The pr causes a breaking change of type a,b or c
- [ ] If there is a breaking change, the pr includes a database migration and/or a fix process for old values, so that upgrade is possible
- [ ] Resyncing and running the migrations provided will result in the same database semantically
If there is a breaking change, especially a big one, please add a justification here. Please elaborate more what the migration achieves, what it cannot achieve or why a migration is not possible.
Column 'json' in table 'metadata' was recorded as null, due to a Unicode NUL character found when trying to parse the json.
This is definitely more clear, but I wonder if it's a little too verbose
This is definitely more clear, but I wonder if it's a little too verbose
how about
The 'json' column in 'metadata' became null due to a Unicode NUL character in the JSON parsing process.
This is definitely more clear, but I wonder if it's a little too verbose
how about
The 'json' column in 'metadata' became null due to a Unicode NUL character in the JSON parsing process.
That definitely looks better :+1: