Am 30.08.2022 um 09:28 schrieb Marcel Reutegger:
Hi Arun,
On 29.08.22, 09:05, "Arun Ram" <[email protected]> wrote:
I have checked the classic jackrabbit . Here i dont see the problem.
In classic jackrabbit InternalVersionHistoryImpl[1] removes the
versionLabel before removing the version.
Also regarding ReferentialIntegrityException of removeVersion , it is
consistent with classic jackrabbit. It is thrown when you remove the
current latest version.
Thanks for checking. Then I think Oak should also remove a potential
label automatically when a version is removed.
I think changes related to remove the version label should be kept in
ReadWriteVersionManager.java[2] since validation logic for version is
present here.
The ReadWriteVersionManager you reference is in oak-jcr, but there is
also a corresponding class in oak-core, where the actual work is done.
I'd say the following method needs to be changed:
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadWriteVersionManager.java#L176
Regards
Marcel
Arun,
would it be possible to add a test that covers this to the
jackrabbit-jcr test suite?
Best regards, Julian