- π¨π¦Canada adam-vessey PE, Canada
Things are not mergeable as-is, as #3173187: Make VBO an optional dependency β / https://git.drupalcode.org/project/views_bulk_edit/-/commit/55f630241d71... moved the code in question.
Got looking into this, as we have run into issues when attempting to manipulate replace/add a number of paragraph entities greater than the batch size, and encountering SQL exceptions (using PostgreSQL... is MySQL less severe with "unique" collisions?). Exception as such:
Drupal\Core\Entity\EntityStorageException: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "paragraphs_item__paragraph_field__uuid__value__key" DETAIL: Key (uuid)=(69262fed-58ba-4021-8a2f-edebfbd7befa) already exists.: INSERT INTO "paragraphs_item" ("revision_id", "type", "uuid", "langcode") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3) RETURNING id; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 815 of /opt/www/drupal/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
This would only pop when going to process the first item in the second batch of items.
- Status changed to Needs review
almost 2 years ago 3:08pm 9 March 2023 - π¨π¦Canada adam-vessey PE, Canada
Actually, scratch that, I was looking just at the patch, not the code in fork. Having taken a quick look at the fork, I thought the fork's claiming that it still had to be rebased was the same thing, but it _does_ actually target the BulkEditFormTrait.
- π¨π¦Canada adam-vessey PE, Canada
Just hiding the patch, as it's cannot presently be applied.
- π¨π¦Canada adam-vessey PE, Canada
Hit the "rebase" button on the MR, to deal with that for now.
The MR seems to do the trick to deal with my "unique violation" exception; however, holding off on swapping the status to RTBC as it does not quite match the original described scenario; though, might only be a slight alteration:
To the "Scenario", making the view process batch-wise, processing a single item per batch ("Process in a batch operation" checked, and "Batch size" of 1; I could not get this to happen when _not_ processing in a batch)
And for "Observed", unique paragraphs being created for all items in the first batch set, but then the "unique violation" exception being thrown adding to the first item in the second batch set (the "batch size + 1"th item).
Seems to suggest something being serialized in the batch state that possibly/probably shouldn't be, but the ::createDuplicate/clone procedure deals with it.