Hi Marcel, > This also sounds reasonable. Did you check the behaviour of classic > Jackrabbit? I think it would be good to have consistent behaviour for > classic Jackrabbit and Oak.
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. I think changes related to remove the version label should be kept in ReadWriteVersionManager.java[2] since validation logic for version is present here. Thanks, Arun Kumar Ram [1] https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java#L416-L422 [2] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/ReadWriteVersionManager.java