Hi Arun,

On 29.08.22, 09:05, "Arun Ram" <arun91i...@gmail.com> 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

Reply via email to