int txc = 0;
// serially delete the links
try ( Transaction tx = db.beginTx() ) {
for (int i=0; i<deletedLinks.size(); i++) {
Relationship rel = db.getRelationshipById(deletedLinks.get(i));
rel.delete();
txc++;
if (txc>50000) {
txc=0;
tx.success();
}
}
tx.success();
tx.close();
}
catch (Exception e) {
System.out.println("Exception link deletion: " + e.getMessage());
}
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Transaction tx = db.beginTx();
//try ( Transaction tx = db.beginTx() ) {
for (int i=0; i<deletedLinks.size(); i++) {
Relationship rel = db.getRelationshipById(deletedLinks.get(i));
rel.delete();
txc++;
if (txc>50000) {
txc=0;
tx.success();
tx.close();
tx = db.beginTx();
}
}
tx.success();
tx.close();
//}
//catch (Exception e) {
// System.out.println("Exception link deletion: " + e.getMessage());
//}