-
-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Milestone
Description
With types with multiple buckets, the unique index constraint is bypassed:
ServerDatabase tx = getServer(0).getDatabase(DATABASE_NAME);
tx.getSchema().createVertexType("SimpleVertexEx").createProperty("svuuid", String.class)
.createIndex(Schema.INDEX_TYPE.LSM_TREE, true);
tx.begin(Database.TRANSACTION_ISOLATION_LEVEL.REPEATABLE_READ);
MutableVertex svt1 = tx.newVertex("SimpleVertexEx");
String uuid1 = UUID.randomUUID().toString();
svt1.set("svex", uuid1);
svt1.set("svuuid", uuid1);
svt1.save();
tx.commit();
tx.begin(Database.TRANSACTION_ISOLATION_LEVEL.REPEATABLE_READ);
MutableVertex svt2 = tx.newVertex("SimpleVertexEx");
String uuid2 = UUID.randomUUID().toString();
svt2.set("svex", uuid2);
svt2.set("svuuid", uuid2);
svt2.save();
tx.commit();
tx.begin(Database.TRANSACTION_ISOLATION_LEVEL.REPEATABLE_READ);
svt2.set("svuuid", uuid1);
svt2.save();
tx.commit();Reactions are currently unavailable