Reset highwater mark *before* rolling back

Created on 15 September 2016, over 8 years ago
Updated 2 March 2025, 5 days ago

Follow-up to #2485385: Move highwater field support to the source plugin, and do not expose its internals on MigrationInterface β†’

Problem/Motivation

Per alexpott's comment β†’ :

Whilst reviewing this patch I pondered if we could set the highwater properly during rollback (see #125 and #127). After thinking about @mikeryan's response some more I think we should more the NULL setting from postRollback() to preRollback() this means that is the rollback fatals for any reason then the highwater is correctly indeterminate rather than wrong.

Good point - worst-case scenario setting it in preRollback(), you have to reimport everything if rollback fails. Worst-case scenario in postRollback() (as it is now), reimporting misses anything that was successfully rolledback - i.e., data loss.

Proposed resolution

Move the highwater code in SourcePluginBase from postRollback() to preRollback().

Remaining tasks

Implement the solution (Novice task).
Tests?

User interface changes

N/A

API changes

None

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component

migration system

Created by

πŸ‡ΊπŸ‡ΈUnited States mikeryan Murphysboro, IL, USA

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024