blazegraph / database

Blazegraph High Performance Graph Database
GNU General Public License v2.0
898 stars 173 forks source link

different instances using the same jnl file #223

Open whisere opened 2 years ago

whisere commented 2 years ago

Hello, I just found two different instances of blazegraph set up with .war files are using the same bigdata.jnl file due to the default setting using the root folder of server container instead of the root of the instance folder. I wonder if there is any potential problem with different instances using the same jnl file? And are there ways to seperate the data for the two instances now? Thanks!

thompsonbry commented 2 years ago

The journal is not intended to be shared by two processes. It is not safe that when used that way.

On Wed, Apr 13, 2022 at 22:18 whisere @.***> wrote:

Hello, I just found two different instances of blazegraph set up with .war files are using the same bigdata.jnl file due to the default setting using the root folder of server container instead of the root of the instance folder. I wonder if there is any potential problem with different instances using the same jnl file? And are there ways to seperate the data for the two instances now? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/blazegraph/database/issues/223, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATW7YF3O5UWHKFDURBOF43VE6TB5ANCNFSM5TMVA5BQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

whisere commented 2 years ago

Thanks! Are the data saved properly in the file from the two instances? In term of not safe it is about one instance can access the data from the other? Is there way to separate them now? And is there way to view the jnl file like viewing database in a mysql or postgresql client gui? Thanks.

thompsonbry commented 2 years ago

The journal is the actual data storage. It must not be used by more than one process at a time. Doing so will corrupt your data as soon as both processes write on the same journal file.

I have no idea about your particular setup. Just make sure that you have a separate file location for each journal.

You can run multiple triple or quad store instances using the same journal as long as they are all being operated by the same process.

Bryan

On Fri, Apr 15, 2022 at 17:20 whisere @.***> wrote:

Thanks! Are the data saved properly in the file from the two instances? In term of not safe it is about one instance can access the data from the other? Is there way to separate them now? And is there way to view the jnl file like viewing database in a mysql or postgresql client gui? Thanks.

— Reply to this email directly, view it on GitHub https://github.com/blazegraph/database/issues/223#issuecomment-1100481116, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATW7YDGEX7GYAS4EEQMFCLVFIBT7ANCNFSM5TMVA5BQ . You are receiving this because you commented.Message ID: @.***>

whisere commented 2 years ago

Thanks! I am a bit confused re different processes and instances above. War files set up folders under server container, they are different processes (I called them instances in the questions)? And we can have multiple name space stores under the process running under the folder? It would be good to add in the setup guide the need to change the default data location and which setting files to change (eg. need to change both GraphStore.properties and RWStore.properties), user won't know it needs to be changed and how... Thanks.