@Override protected void after( boolean success ) { shutdown( success ); }
@Override public void shutdown() { shutdown( true ); }
public void shutdownAndKeepStore() { shutdown( false ); }
private void initializeIndexWithDataAndShutdown() { createIndex(); try ( Transaction tx = db.beginTx() ) { db.createNode( label ).setProperty( propKey, numberValue ); db.createNode( label ).setProperty( propKey, stringValue ); db.createNode( label ).setProperty( propKey, spatialValue ); db.createNode( label ).setProperty( propKey, temporalValue ); tx.success(); } db.shutdown(); }
@Test public void recoveryForRelationshipCommandsOnly() throws Throwable { // shutdown db here DatabaseLayout databaseLayout = db.databaseLayout(); shutdownDB(); try ( Transaction tx = db.beginTx() ) { Index<Relationship> index = db.index().forRelationships( "myIndex" ); Node node = db.createNode(); Relationship relationship = db.createNode().createRelationshipTo( node, RelationshipType.withName( "KNOWS" ) ); index.add( relationship, "key", "value" ); tx.success(); } db.shutdown(); Config config = Config.defaults(); IndexConfigStore indexStore = new IndexConfigStore( databaseLayout, fileSystemRule.get() ); LuceneDataSource ds = new LuceneDataSource( databaseLayout, config, indexStore, fileSystemRule.get(), OperationalMode.single ); ds.start(); ds.stop(); }
@Test public void testIndexDeleteIssue() throws Exception { try ( Transaction tx = db.beginTx() ) { db.index().forNodes( "index" ); tx.success(); } shutdownDB(); db.ensureStarted(); Index<Node> index; Index<Node> index2; try ( Transaction tx = db.beginTx() ) { index = db.index().forNodes( "index" ); index2 = db.index().forNodes( "index2" ); Node node = db.createNode(); index.add( node, "key", "value" ); tx.success(); } try ( Transaction tx = db.beginTx() ) { index.delete(); index2.add( db.createNode(), "key", "value" ); tx.success(); } db.shutdown(); db.ensureStarted(); forceRecover(); }
public void shutdownAndKeepStore() { shutdown( false ); }
@Override protected void after( boolean success ) { shutdown( success ); }
@Override public void shutdown() { shutdown( true ); }