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

Import database issues OrientDB Server v2.0-M2 #3137

Closed
Bretto opened this issue Dec 5, 2014 · 18 comments
Closed

Import database issues OrientDB Server v2.0-M2 #3137

Bretto opened this issue Dec 5, 2014 · 18 comments
Assignees
Milestone

Comments

@Bretto
Copy link

Bretto commented Dec 5, 2014

When I export my db:
@Rid @Class:AppData data _allow
#12:27 "my data" #5:2

and Import it with:
import database C:/myDB.export -preserveClusterIDs=true -rebuildIndexes=false

I get:
@Rid @Class:AppData data _allow
#12:0 "my data" #5:2

So the cluster ID is preserved but the Index was rebuild, is this a bug ? or Am I misunderstanding something ?

@lvca
Copy link
Member

lvca commented Dec 7, 2014

Could you provide the log to see the indexes are rebuilt?

@Bretto
Copy link
Author

Bretto commented Dec 7, 2014

2014-12-05 08:57:40:067 INFO Loading configuration from: /Users/Separ8/Documents/workspace/orientdb-community-2.0-M2/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2014-12-05 08:57:40:416 INFO OrientDB Server v2.0-M2 (build UNKNOWN@r; 2014-09-29 21:06:32+0000) is starting up... [OServer]
2014-12-05 08:57:40:440 INFO Databases directory: /Users/Separ8/Documents/workspace/orientdb-community-2.0-M2/databases [OServer]
2014-12-05 08:57:40:558 INFO Listening binary connections on 0.0.0.0:2424 (protocol v.25, socket=default) [OServerNetworkListener]
2014-12-05 08:57:40:560 INFO Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]
2014-12-05 08:57:40:579 INFO Installing dynamic plugin 'studio-2.0.zip'... [OServerPluginManager]
2014-12-05 08:57:40:668 INFO Installing GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]
2014-12-05 08:57:40:672 WARN [OVariableParser.resolveVariables] Error on resolving property: distributed [orientechnologies]
2014-12-05 08:57:40:673 INFO Installing Script interpreter. WARN: authenticated clients can execute any kind of code into the server by using the following allowed languages: [sql] [OServerSideScriptInterpreter]
2014-12-05 08:57:40:674 INFO OrientDB Server v2.0-M2 is active. [OServer]
2014-12-05 08:59:02:075 WARN ->0:0:0:0:0:0:0:1: Command not found: GET.studio [ONetworkProtocolHttpDb]
2014-12-05 09:19:40:369 WARN ->0:0:0:0:0:0:0:1: Command not found: GET.studio/scripts/ng-table.map [ONetworkProtocolHttpDb]
2014-12-05 09:28:37:831 WARN ->0:0:0:0:0:0:0:1: Command not found: GET.studio/scripts/ng-table.map [ONetworkProtocolHttpDb]
2014-12-05 09:28:44:100 WARN ->0:0:0:0:0:0:0:1: Command not found: GET.studio/scripts/ng-table.map [ONetworkProtocolHttpDb]
2014-12-05 09:56:26:719 WARN ->0:0:0:0:0:0:0:1: Command not found: GET.studio/scripts/ng-table.map [ONetworkProtocolHttpDb]
2014-12-05 10:30:38:147 WARN ->0:0:0:0:0:0:0:1: Command not found: GET.studio/scripts/ng-table.map [ONetworkProtocolHttpDb]
2014-12-05 10:52:54:058 WARN ->0:0:0:0:0:0:0:1: Command not found: GET.studio/scripts/ng-table.map [ONetworkProtocolHttpDb]
2014-12-05 11:24:21:597 INFO - Rebuilding index Organigramme.ORole.name (estimated 4 items)... [OIndexRebuildOutputListener]
2014-12-05 11:24:21:602 INFO --> OK, indexed 4 items in 4 ms [OIndexRebuildOutputListener]
2014-12-05 11:30:47:403 INFO Creating database plocal:${ORIENTDB_HOME}/databases/Organigramme [OServerCommandPostDatabase]
2014-12-05 11:32:23:195 INFO - Rebuilding index Organigramme.ORole.name (estimated 4 items)... [OIndexRebuildOutputListener]
2014-12-05 11:32:23:198 INFO --> OK, indexed 4 items in 6 ms [OIndexRebuildOutputListener]
2014-12-05 11:35:15:999 INFO - Rebuilding index Organigramme.ORole.name (estimated 4 items)... [OIndexRebuildOutputListener]
2014-12-05 11:35:16:004 INFO --> OK, indexed 4 items in 6 ms [OIndexRebuildOutputListener]
2014-12-05 11:35:16:007 INFO - Rebuilding index Organigramme.OUser.name (estimated 4 items)... [OIndexRebuildOutputListener]
2014-12-05 11:35:16:009 INFO --> OK, indexed 4 items in 3 ms [OIndexRebuildOutputListener]
2014-12-05 11:35:17:858 INFO - Rebuilding index Organigramme.ORole.name (estimated 8 items)... [OIndexRebuildOutputListener]
2014-12-05 11:35:17:860 INFO --> OK, indexed 4 items in 2 ms [OIndexRebuildOutputListener]
2014-12-05 11:37:57:558 INFO Creating database plocal:${ORIENTDB_HOME}/databases/Organigramme [OServerCommandPostDatabase]
2014-12-05 11:38:05:971 SEVE Internal server error:
com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query
Query: AppData
------^
--> com.orientechnologies.orient.core.exception.OCommandExecutionException: Class 'APPDATA' was not found in current database [ONetworkProtocolHttpDb]
2014-12-05 11:38:32:924 SEVE Internal server error:
com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query
Query: AppData
------^
--> com.orientechnologies.orient.core.exception.OCommandExecutionException: Class 'APPDATA' was not found in current database [ONetworkProtocolHttpDb]
2014-12-05 11:40:15:872 INFO - Rebuilding index Organigramme.ORole.name (estimated 4 items)... [OIndexRebuildOutputListener]
2014-12-05 11:40:15:873 INFO --> OK, indexed 4 items in 2 ms [OIndexRebuildOutputListener]
2014-12-05 14:35:12:017 SEVE Internal server error:
com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query
Query: OUuser
------^
--> com.orientechnologies.orient.core.exception.OCommandExecutionException: Class 'OUUSER' was not found in current database [ONetworkProtocolHttpDb]
2014-12-07 21:32:58:512 INFO Creating database plocal:${ORIENTDB_HOME}/databases/Organigramme [OServerCommandPostDatabase]
2014-12-07 21:33:24:063 INFO - Rebuilding index Organigramme.ORole.name (estimated 4 items)... [OIndexRebuildOutputListener]
2014-12-07 21:33:24:065 INFO --> OK, indexed 4 items in 2 ms [OIndexRebuildOutputListener]

@Bretto
Copy link
Author

Bretto commented Dec 7, 2014

A Record level security is implemented in the DB I am using for the import / export test...

@lvca
Copy link
Member

lvca commented Dec 8, 2014

@Bretto I see you're using 2.0-M2, could you try with 2.0-SNAPSHOT?

@Bretto
Copy link
Author

Bretto commented Dec 8, 2014

I don't know where to find 2.0-SNAPSHOT...

@Bretto
Copy link
Author

Bretto commented Dec 9, 2014

I downloaded orientdb-community-2.0-20141208.175939-452-distribution.zip but
I can't access the running Snapshot, I did chmod u+x *.sh in bin and run ./server.sh, here the log:

2014-12-09 17:47:22:569 INFO OrientDB auto-config DISKCACHE=1,553MB (heap=494MB os=4,096MB disk=127,788MB) [orientechnologies]
2014-12-09 17:47:22:577 INFO Loading configuration from: /Users/Separ8/Documents/workspace/orientdb-community-2.0-SNAPSHOT/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2014-12-09 17:47:22:892 INFO OrientDB Server v2.0-SNAPSHOT (build UNKNOWN@r; 2014-12-08 11:38:22-0500) is starting up... [OServer]
2014-12-09 17:47:22:964 INFO Databases directory: /Users/Separ8/Documents/workspace/orientdb-community-2.0-SNAPSHOT/databases [OServer]
2014-12-09 17:47:23:028 INFO Listening binary connections on 0.0.0.0:2424 (protocol v.27, socket=default) [OServerNetworkListener]
2014-12-09 17:47:23:029 INFO Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]

and when accessing http://localhost:2480 it just hangs, what is missing to run it properly ?

@lvca
Copy link
Member

lvca commented Dec 9, 2014

@Bretto I see you have only 127,788MB of free space. This could be the reason. Could you make more room on your HD, or set the diskcache to a lower value? Use -Dstorage.diskCache.bufferSize=100

@Bretto
Copy link
Author

Bretto commented Dec 9, 2014

I wonder where is this 127,788MB coming from as I have 133.64GB of free space on my 512GB HD...

@lvca
Copy link
Member

lvca commented Dec 9, 2014

@Bretto you're right. it's 127GB (comma separates thousands). We found the problem and we fixed it in last snapshot.

@lvca lvca closed this as completed Dec 9, 2014
@lvca lvca reopened this Dec 9, 2014
@lvca lvca modified the milestones: 2.0 Final, 2.0-RC (Release Candidate) Dec 9, 2014
@Bretto
Copy link
Author

Bretto commented Dec 10, 2014

I re-ran the test with the latest Snapshot "orientdb-community-2.0-20141209.233541-460-distribution" and the @Rid id still being rebuild...

example case:
create new Class 'Test'
create new instance
delete the instance
create new instance

select from Test
----+-----+------+-----
|# |@Rid |@Class|name
----+-----+------+-----
0 |#12:1|Test |my name
----+-----+------+-----

now the @Rid is #12:1

export db
import database C:\myDB.gz -preserveClusterIDs = true -rebuildIndexes = false

select from Test
----+-----+------+-----
|# |@Rid |@Class|name
----+-----+------+-----
0 |#12:0|Test |my name
----+-----+------+-----

The RID is being rebuild, is there a way to keep it the way it was? I am building an online/offline mobile app and the @Rid is the unique identifier of my data source, if I do a DB Import of my DB backups and my @Rid have changed it will break the app.

@lvca
Copy link
Member

lvca commented Dec 24, 2014

Don't use spaces in import. Try this:

import database C:\myDB.gz -preserveClusterIDs=true -rebuildIndexes=false

@lvca lvca closed this as completed Dec 24, 2014
@lvca lvca modified the milestones: 2.0 Final, 2.0-rc2 Jan 12, 2015
@obendt
Copy link

obendt commented Jun 9, 2015

I am having the same issue in 2.0.10 using the exact syntax as suggested by lvca above. Still the @Rid is being rebuilt (with the exact behavior as described by Bretto.)

Since i have external references from my app to the @rids i need them to stay the same after exporting and importing the database.

@Bretto
Copy link
Author

Bretto commented Jun 9, 2015

This problem was never resolved for me either... at the time I just gave up on it and used the Record level security to map back to the user personal data.

@naman53
Copy link

naman53 commented Jul 21, 2016

I am facing same problem. Is this problem is solved in any version?

@thomasdemoor
Copy link

thomasdemoor commented Dec 5, 2016

+1. Having still the same issue. Is this solved in any version? Just want to keep the @Rid when importing...

@ebonavita85
Copy link

It is fixed in the release 3.0.0?It will be fixed?

@tglman
Copy link
Member

tglman commented Jan 31, 2017

hi,

This is not guaranteed at the storage level, and is done by design.

Regards

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

No branches or pull requests

7 participants