Skip to content

Commit 20a24d0

Browse files
committed
Update migration error storage from map to thread-safe list using CopyOnWriteArrayList for improved error tracking and reporting
1 parent b5272c5 commit 20a24d0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/groovy/com/netgrif/application/engine/migration/helpers/AbstractMigrationHelper.groovy

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ abstract class AbstractMigrationHelper<T> {
5050
protected final MigrationProperties migrationProperties
5151

5252
/**
53-
* A thread-safe map that stores migration errors encountered during the migration process.
54-
* The map is keyed by a string identifier (typically a document ID or migration step identifier)
55-
* and contains a list of {@link MigrationError} objects representing all errors associated with that key.
56-
* This structure allows for efficient error tracking and reporting during bulk migration operations.
53+
* A thread-safe list of migration errors that occurred during the migration process.
54+
* This list stores all errors encountered while processing documents, allowing the migration
55+
* to continue execution while collecting errors for later review and reporting.
56+
* The list uses {@link CopyOnWriteArrayList} to ensure thread-safety during concurrent
57+
* migration operations.
5758
*/
5859
private final List<MigrationError> migrationErrors
5960

0 commit comments

Comments
 (0)