Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB restart required between oelt runs for OpenBeerDB tutorial #336

Closed
Sygyzmundovych opened this issue Nov 12, 2018 · 1 comment
Closed
Assignees

Comments

@Sygyzmundovych
Copy link

I am going through http://orientdb.com/docs/3.0.x/gettingstarted/tutorials/Import-the-Database-of-Beers.html tutorial. To be able to load each file I needed to shutdown (Ctrl+C) and to start the database before every load (I do not know what is other way to restart the server, or to close and reopen a database).

On Win10 I was not getting any messages (see issue #335), but on Linux (using docker on Google Cloud Shell) I am getting mesages from oetl, and see the following:

...
2018-11-12 12:10:20:173 INFO  Started execution with 1 worker threads [OETLProcessor]Exception `5AEBE890` in storage `plocal:/orientdb/bin/../databases//openbeerdb`: 3.0.10 - Veloce (build eac0654847df662ca03b45a6a5efa5eadd229ca5, branch 3.0.x)
com.orientechnologies.orient.core.exception.OStorageException: Database is locked by another process, please shutdown process and try again
        at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedStorageDirtyFlag.lockFile(OPaginatedStorageDirtyFlag.java:102)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedStorageDirtyFlag.open(OPaginatedStorageDirtyFlag.java:127)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.preOpenSteps(OLocalPaginatedStorage.java:430)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:383)
        at com.orientechnologies.orient.core.db.OrientDBEmbedded.poolOpen(OrientDBEmbedded.java:280)
        at com.orientechnologies.orient.core.db.ODatabasePoolImpl$1.createNewResource(ODatabasePoolImpl.java:43)
        at com.orientechnologies.orient.core.db.ODatabasePoolImpl$1.createNewResource(ODatabasePoolImpl.java:40)
        at com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:95)
        at com.orientechnologies.orient.core.db.ODatabasePoolImpl.acquire(ODatabasePoolImpl.java:61)
        at com.orientechnologies.orient.core.db.ODatabasePool.acquire(ODatabasePool.java:132)
        at com.orientechnologies.orient.etl.loader.OETLOrientDBLoader.beginLoader(OETLOrientDBLoader.java:412)
        at com.orientechnologies.orient.etl.OETLPipeline.begin(OETLPipeline.java:64)
        at com.orientechnologies.orient.etl.OETLPipelineWorker.<init>(OETLPipelineWorker.java:34)
        at com.orientechnologies.orient.etl.OETLProcessor.lambda$runExtractorAndPipeline$0(OETLProcessor.java:193)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.stream.IntPipeline$4$1.accept(IntPipeline.java:250)
        at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:110)
        at java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:693)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.orientechnologies.orient.etl.OETLProcessor.runExtractorAndPipeline(OETLProcessor.java:195)
        at com.orientechnologies.orient.etl.OETLProcessor.execute(OETLProcessor.java:171)
        at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:114)

2018-11-12 12:10:20:293 SEVER ETL process has problem:  [OETLProcessor]
...

I see this is happening if I am checking loaded data after each load by logging via the CLI console or web studio. Now that I did not check data, but ran four loads right after each other then all are executed and all data is loaded into the database.

C:\Tools\orientdb-3.0.10\bin>oetl.bat ".....\Datasets\open-beer-database-dumps-brewdega\categories.json"
OrientDB etl v.3.0.10 - Veloce (build eac0654847df662ca03b45a6a5efa5eadd229ca5, branch 3.0.x) https://www.orientdb.com
C:\Tools\orientdb-3.0.10\bin>oetl.bat ".....\Datasets\open-beer-database-dumps-brewdega\styles.json"
OrientDB etl v.3.0.10 - Veloce (build eac0654847df662ca03b45a6a5efa5eadd229ca5, branch 3.0.x) https://www.orientdb.com
C:\Tools\orientdb-3.0.10\bin>oetl.bat ".....\Datasets\open-beer-database-dumps-brewdega\breweries.json"
OrientDB etl v.3.0.10 - Veloce (build eac0654847df662ca03b45a6a5efa5eadd229ca5, branch 3.0.x) https://www.orientdb.com
C:\Tools\orientdb-3.0.10\bin>oetl.bat ".....\Datasets\open-beer-database-dumps-brewdega\beers.json"
OrientDB etl v.3.0.10 - Veloce (build eac0654847df662ca03b45a6a5efa5eadd229ca5, branch 3.0.x) https://www.orientdb.com
C:\Tools\orientdb-3.0.10\bin>
@luigidellaquila
Copy link
Member

Hi @Sygyzmundovych

Thank you for pointing it out, I'm adding a note to the tutorial.
This is an expected behavior: to avoid conflicts, two JVM processes (eg. an ETL and an OrientDB server) cannot access the same DB folders

Thanks

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants