- Issue created by @huzooka
- 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺
I found the root cause: https://git.drupalcode.org/project/babel/-/blob/1.x/src/BabelService.php...
Since strings can be (and are) reused across configs (moreover, a string used in locale translation can also be used in configs), hashes are more likely to cause collision since they already exist in this table. Just install a standard profile and then set up debugger at the caught exception to see them. If one record fails then the entire set fails (up to 200 records).
My proposal is to remove these "workarounds" because they aren't really workarounds (they cause data loss). The status insert query I'm referring can be replaced by an upsert; the first query in this BabelSercvice::update() method must be exectuted individually; or the data structure must be reordered to contain only one primary key (e.g.: "
<plugin>:<babel-id>
") so that we can use upsert there too.drush si standard -y
drush en babel -y
drush sql:query "SELECT COUNT(*) FROM (SELECT DISTINCT hash FROM babel_source WHERE plugin = 'config') wrapper"
➡️ 288drush sql:query "SELECT COUNT(*) FROM (SELECT DISTINCT bs.hash FROM babel_source bs INNER JOIN babel_source_status bss ON bs.hash = bss.hash WHERE plugin = 'config') wrapper
➡️ 78
- 🇬🇷Greece dimilias
Just for the record, the query from https://www.drupal.org/project/babel/issues/3536782#comment-16207723 🐛 Data integrity error: some hashes recorded as babel_source lack status in babel_source_status table Active point 4, becomes
drush sql:query "SELECT COUNT(*) FROM (SELECT DISTINCT bs.hash FROM babel_source bs INNER JOIN babel_source_status bss ON bs.id = bss.id WHERE bs.plugin = 'config') wrapper"
after the update as the hash is not there in the bss table and the plugin is in both tables (ambiguous). -
idimopoulos →
committed 01c41753 on 1.x authored by
alorenc →
Issue #3536782 by alorenc: Data integrity error: some hashes recorded as...
-
idimopoulos →
committed 01c41753 on 1.x authored by
alorenc →
- 🇬🇷Greece dimilias
Thanks for the work. The number of entries agree after the update.
-
claudiu.cristea →
committed 7c184dba on 1.x
Revert "Issue #3536782 by alorenc: Data integrity error: some hashes...
-
claudiu.cristea →
committed 7c184dba on 1.x
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
claudiu.cristea → made their first commit to this issue’s fork.
-
claudiu.cristea →
committed 20dd8a25 on 1.x authored by
saidatom →
Issue #3536782 by alorenc, saidatom, idimopoulos, huzooka, claudiu....
-
claudiu.cristea →
committed 20dd8a25 on 1.x authored by
saidatom →
Automatically closed - issue fixed for 2 weeks with no activity.