// COMMIT INDEX CHANGES
final ODocument indexEntries = currentTx.getIndexChanges();
if (indexEntries != null) {
for (Entry<String, Object> indexEntry : indexEntries) {
final OIndex index = getMetadata().getIndexManager().getIndexInternal(indexEntry.getKey());
index.commit((ODocument) indexEntry.getValue());
}
}
} finally {
// RELEASE INDEX LOCKS IF ANY
if (lockedIndexes != null)