cancel
Showing results for 
Search instead for 
Did you mean: 

Version History and 'can't create branches' error

angelborroy
Community Manager Community Manager
Community Manager
We have an installation of Alfresco 4.2.c over Oracle 11g. Despite this is not a supported configuration for Community versions, we need to demonstrate that Alfresco works fine before adopting Alfresco Enterprise.

Every functionality seems to work but versioning. Reading Alfresco source code, we have identified a problem: at VersionHistoryImpl.VersionComparatorAsc java code, versions are ordered by node-dbid field. It should be ok, but we have found version labels with a node-dbid assignment inconsistent (5.3 with node-dbid=57746 and 5.4 with node-dbid=57735). For this nodes, Alfresco is failing with a "Can't create branches" error log.

On the other hand, we have seen deprecated methods for version ordering in Alfresco source code which are based on version label (VersionLabelComparator.java). This code should fit our scenario.

The questions: Should we adapt the code to order versions by version label? Anyone knows why Alfresco is setting disordered sequence ids when using Oracle?

Thanks in advance.
Hyland Developer Evangelist
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
The version service is due a rework and a cleanup.   However first someone needs to make a hard judgement about how it should work.

Given that Oracle is not supported for community I don't know why it would return a disordered sequence.   But I'd suspect something wrong with the database mapping or the driver.   There should be tickets in JIRA discussing the version label rework.   I remember there were some issues with it causing this branches error a few years ago.

If your real goal is to use Alfresco Enterprise then I suggest you sign up for an Enterprise Trial which could be on Oracle.   If not then at least use 4.2.f

In the meantime if something looks like its what you want then use it.   IIRC this version label stuff is all pretty simple and extendable.

angelborroy
Community Manager Community Manager
Community Manager
Thanks for your point of view.

Some external reasons make imposible for us to upgrade to 4.2.f or to an Enterprise trial by now. However, Enterprise adoption is a must in a middle term for this case.

The real problem is that we have identified a cause (Oracle sequence incorrect order) an only one problem. Maybe there are other functionalities failing out there. We'll try to fix the sequence assignments, but it seems a very hard task.
Hyland Developer Evangelist

angelborroy
Community Manager Community Manager
Community Manager
Finally, we have found the real cause. We are working on an Oracle RAC database.

Alfresco defines the SEQUENCE as follows on install:


CREATESEQUENCE ALFRESCO_OWNER.ALF_NODE_SEQ
  MAXVALUE 9999999999999999999999999999
  MINVALUE 1
  NOCYCLE
  CACHE 20
  NOORDER;


We've observed behaviours on node-dbid retrieval like this:

Session 1 at node-A: nextval -> 101
Session 2 at node-A: nextval -> 102
Session 1 at node-B: nextval -> 121
Session 1 at node-B: nextval -> 122
Session 1 at node-A: nextval -> 103
Session 1 at node-A: nextval -> 104

Which will produce disordered settings (103 seems to be greater than 122).

Alfresco Enterprise defines SEQUENCES as ORDER at AlfrescoCreate-RepoTables.sql, so this issue will not be reproduced on a real environment.

<CODE>
CREATE SEQUENCE alf_node_seq START WITH 1 INCREMENT BY 1 ORDER;
</CODE>
Hyland Developer Evangelist
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.