According to Bulk DML Exception Handling :
Apex triggers are fired for the first save attempt, and if errors are encountered for some records and subsequent attempts are made to save the subset of successful records, triggers are re-fired on this subset of records.
That's fine, but when I modify some records in the first trigger attempt, and mark a few of them with
addError(), then the second attempt gets the unchanged subset (without records marked with
addError() but also without my modifications on the good ones).
Is there any way to preserve the state between all-or-none before insert attempts?