Discussion:
Storage not closed properly when using plocal and tinkerpop orientGraphFactory
Seamus Minogue
2014-09-09 19:09:08 UTC
Permalink
I am having a problem with closing a plocal orient database properly when
using the tinkerpop graph factory api.

orientGraphFactory = new OrientGraphFactory("plocal:" + secureProperties.
getProperty("orientdb"), "admin", "admin");

orientGraphFactory.getDatabase().getStorage().getConfiguration().
dateTimeFormat = DATE_FORMAT;

orientGraphFactory.getDatabase().getStorage().getConfiguration().update();

orientGraphFactory.setTransactional(false);

orientGraphFactory.setupPool(1, 30);

orientGraphFactory.getDatabase().declareIntent(new OIntentMassiveInsert());

orientGraphFactory.getDatabase().setValidationEnabled(false);

orientGraphFactory.getDatabase().setRetainRecords(true);


OrientGraphNoTx graph = orientGraphFactory.getNoTx();
... Do Inserts of lots of stuff

graph.commit();

orientGraphFactory.getDatabase().declareIntent(null);

orientGraphFactory.getDatabase().close();

orientGraphFactory.close();

This all works and my database is populated properly. The problem is that
sometimes (not always) when I restart I get the messages:

WARNING: Storage harvest94 was not closed properly. Will try to restore
from write ahead log.

INFO: Data restore procedure from full checkpoint is started. Restore is
performed from LSN OLogSequenceNumber{segment=50, position=38487926}


This restore procedure can take as much as 4hrs to complete... The posts I
have seen about this problem seem to conclude that I should be using 1.7.4
so I updated to 1.7.8 and still see the problem. Other advice is to call
database.shutdown(). getDatabase from the graphfactory doesn't have a
shutdown method only close.


Is there something I am missing?
--
---
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Andrey Lomakin
2014-09-10 08:39:05 UTC
Permalink
Yes,
Actually I think that shutdown hook is not triggering on your application.

Could you call Orient.instance().shutdown() during application close ?
Post by Seamus Minogue
I am having a problem with closing a plocal orient database properly when
using the tinkerpop graph factory api.
orientGraphFactory = new OrientGraphFactory("plocal:" + secureProperties.
getProperty("orientdb"), "admin", "admin");
orientGraphFactory.getDatabase().getStorage().getConfiguration().
dateTimeFormat = DATE_FORMAT;
orientGraphFactory.getDatabase().getStorage().getConfiguration().update();
orientGraphFactory.setTransactional(false);
orientGraphFactory.setupPool(1, 30);
orientGraphFactory.getDatabase().declareIntent(new OIntentMassiveInsert
());
orientGraphFactory.getDatabase().setValidationEnabled(false);
orientGraphFactory.getDatabase().setRetainRecords(true);
OrientGraphNoTx graph = orientGraphFactory.getNoTx();
... Do Inserts of lots of stuff
graph.commit();
orientGraphFactory.getDatabase().declareIntent(null);
orientGraphFactory.getDatabase().close();
orientGraphFactory.close();
This all works and my database is populated properly. The problem is that
WARNING: Storage harvest94 was not closed properly. Will try to restore
from write ahead log.
INFO: Data restore procedure from full checkpoint is started. Restore is
performed from LSN OLogSequenceNumber{segment=50, position=38487926}
This restore procedure can take as much as 4hrs to complete... The posts I
have seen about this problem seem to conclude that I should be using 1.7.4
so I updated to 1.7.8 and still see the problem. Other advice is to call
database.shutdown(). getDatabase from the graphfactory doesn't have a
shutdown method only close.
Is there something I am missing?
--
---
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
For more options, visit https://groups.google.com/d/optout.
--
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB
--
---
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Seamus Minogue
2014-09-10 18:43:09 UTC
Permalink
That seems to have done it. Thanks.

-Seamus
Post by Andrey Lomakin
Yes,
Actually I think that shutdown hook is not triggering on your application.
Could you call Orient.instance().shutdown() during application close ?
Post by Seamus Minogue
I am having a problem with closing a plocal orient database properly when
using the tinkerpop graph factory api.
orientGraphFactory = new OrientGraphFactory("plocal:" + secureProperties.
getProperty("orientdb"), "admin", "admin");
orientGraphFactory.getDatabase().getStorage().getConfiguration().
dateTimeFormat = DATE_FORMAT;
orientGraphFactory.getDatabase().getStorage().getConfiguration().update
();
orientGraphFactory.setTransactional(false);
orientGraphFactory.setupPool(1, 30);
orientGraphFactory.getDatabase().declareIntent(new OIntentMassiveInsert
());
orientGraphFactory.getDatabase().setValidationEnabled(false);
orientGraphFactory.getDatabase().setRetainRecords(true);
OrientGraphNoTx graph = orientGraphFactory.getNoTx();
... Do Inserts of lots of stuff
graph.commit();
orientGraphFactory.getDatabase().declareIntent(null);
orientGraphFactory.getDatabase().close();
orientGraphFactory.close();
This all works and my database is populated properly. The problem is that
WARNING: Storage harvest94 was not closed properly. Will try to restore
from write ahead log.
INFO: Data restore procedure from full checkpoint is started. Restore is
performed from LSN OLogSequenceNumber{segment=50, position=38487926}
This restore procedure can take as much as 4hrs to complete... The posts
I have seen about this problem seem to conclude that I should be using
1.7.4 so I updated to 1.7.8 and still see the problem. Other advice is to
call database.shutdown(). getDatabase from the graphfactory doesn't have a
shutdown method only close.
Is there something I am missing?
--
---
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
For more options, visit https://groups.google.com/d/optout.
--
Best regards,
Andrey Lomakin.
Orient Technologies
the Company behind OrientDB
--
---
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Loading...