By trying to dissect the problem and see what is causing it I was trying different things.
My application, after each writing of a document, it reads from the database to extract the document information and their counts. If I turn off this reading the document information everything works just like fine. The relevant code: private DocumentCounts extractDocumentCounts(String guid, String taxYear, String[] categories) { int allDocuments = 0; Map<String, Integer> categoryDocuments = new HashMap<String, Integer>(); try { for(int i = 0; i < categories.length; i++) { StringBuilder builder = new StringBuilder(); builder.append("SELECT COUNT(*) FROM "); builder.append(DOCUMENT_CLASS); builder.append(" WHERE guid='"); builder.append(guid); builder.append("' AND fiscalyear='"); builder.append(taxYear); builder.append("' AND category LIKE '%"); builder.append(categories[i]); builder.append("%'"); List<ODocument> resultList = factory.getDatabase().command(new OCommandSQL(builder.toString())).execute(); Long result = resultList.get(0).field("COUNT"); categoryDocuments.put(categories[i], result.intValue()); } StringBuilder builder = new StringBuilder(); builder.append("SELECT COUNT(*) FROM "); builder.append(DOCUMENT_CLASS); builder.append(" WHERE guid='"); builder.append(guid); builder.append("' AND fiscalyear='"); builder.append(taxYear); builder.append("'"); List<ODocument> resultList = factory.getDatabase().command(new OCommandSQL(builder.toString())).execute(); Long result = resultList.get(0).field("COUNT"); allDocuments = result.intValue(); } catch(Exception e) { e.printStackTrace(); } return new DocumentCounts(allDocuments, categoryDocuments); } So, somehow, this reading from a database right after something has been written somehow causes this problem (that I am unable to solve). Anybody has any idea how can I solve this? Thanks, Ivan -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.