Done
Details
Details
Assignee
Venkatesh Prasad
Venkatesh Prasad(Deactivated)Reporter
Zsolt Parragi
Zsolt ParragiLabels
Original estimate
1h 7m
Time tracking
Fix versions
Affects versions
Priority
Created March 4, 2020 at 9:49 AM
Updated March 6, 2024 at 9:46 PM
Resolved April 4, 2023 at 1:37 PM
A recurring pattern in PXC is that if a code has to differ from PS, instead of modifying it directly, the following ifdef pattern is used:
This makes the change clearly visible for the developers, however it also causes mismerges when using `git merge` (e.g. next major version PS merge)
When using this pattern, and the original PS code is modified, `git merge` will modify the original PS code, but leave the duplicated PXC code as is. Unless the unchanged duplicated fails to compile, this is easy to miss in a huge merge (the 8.0 major version diffs are quite large compared to 5.6/5.7)
This means that the bug fixed / feature implemented in the changed block won't be there in PXC, or won't work correctly, as was the case with the clone plugin, which was introduced during one of the 8.0 releases.
Compared to this, if we would stop using WITH_WSREP, and would simply modify the code (without duplicating it) `git merge` would report a conflict for each of our modified code blocks (when it's not able to apply the patch on the modified code automatically), pointing out the change.
We either should (I would say before the next upstream merge):
Remove WITH_WSREP, so automerge will warn us correctly of issues
Or develop a merge helper script, which detects changes in WITHOUT_WSREP regions, and warns the developer doing the merge