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

Unable to perform Import when running in distributed mode #7268

Closed
RAndrews137 opened this issue Mar 24, 2017 · 9 comments
Closed

Unable to perform Import when running in distributed mode #7268

RAndrews137 opened this issue Mar 24, 2017 · 9 comments

Comments

@RAndrews137
Copy link

OrientDB Version: 2.2.17 Enterprise

Java Version: 1.8

OS: SLES

Expected behavior

Schema and data imported successfully

Actual behavior

Received following error message:

Non merge mode (-merge=false): removing all default non security classesError on database import happened just before line 0, column 1
com.orientechnologies.orient.core.exception.ORecordNotFoundException: The record has no id. It is probably new or still transient

Steps to reproduce

  1. Perform an export for database 1
  2. Create destination database
  3. Configure destination to run in distributed mode
  4. Attempt to run import for the export file obtained in step 1
  5. Will receive error message listed under Actual Behavior

Please note, the same export file and same database will successfully import if NOT running in distributed mode. There is something very specific about running in a distributed environment that causes the issue. What is the correct approach to run an import into a distributed setup?

@santo-it
Copy link

Hi,

Thanks for opening this issue. Right now the approach is: re-import in single mode and, after import has been completed, restart in distributed mode. There's a documentation bug open to make this more clear: orientechnologies/orientdb-docs#267

Ideally in the future import will work (directly) also on distributed

Tagging as enhancement. Let us know if you feel we can help more

Thanks,

@RAndrews137
Copy link
Author

@santo-it Thanks for replying. We don't always have control of the destination environment to bring down nodes to do an import. Do you have any ETA on when it might it might be added as an enhancement? Do you know what is causing the exception?

@dalegarv
Copy link

This is Dale from ADP. We also have the need for our code to create databases on the fly, which requires that we perform a schema import using the Java API. Of course there's no way we can do this by stopping and starting the database server.

@lvca
Copy link
Member

lvca commented Jul 20, 2017

Hi guys, you could:

  1. create the database while in HA
  2. all the nodes will take the database as empty
  3. stop replication on all the nodes but one, through this SQL command: HA STOP REPLICATION server2 -dropDatabase
  4. repeat 3 for all the servers but one, so only one server will have the database ONLINE
  5. import the database on the online server only
  6. set ONLINE the other servers with HA START REPLICATION server 2 mode FULL
  7. repeat 6 for all the other nodes

@lvca
Copy link
Member

lvca commented Aug 5, 2017

@RAndrews137 did it work?

@RAndrews137
Copy link
Author

Hi @lvca, we have not had a chance to test your suggestion and probably will not have a need to. Overall, I still suggest having a means to import into an HA cluster with no changes. Since this is not an active issue for us, perhaps this can be classified as an Enhancement. Thanks :)

@padutilleul
Copy link

padutilleul commented Oct 4, 2017

Hello,

We are encountering the same problem on OrientDb 2.2.28 Community edition.

We tried running the command HA STOP REPLICATION orientdb-dev2 -dropDatabase

But only got the following error :
Error: com.orientechnologies.orient.core.command.OCommandExecutorNotFoundException: Cannot find a command executor for the command request: sql.ha STOP REPLICATION orientdb-dev2 -dropDatabase

Is this command available in community edition ? We could not find it in the documentation.

@mmacfadden
Copy link
Contributor

@lvca and @tglman this is becoming important to us as well. We will be starting to run in distributed mode in a multi-tenant scenario where each customer has their own database. We definitely need to be able to create and import database in distributed mode without impacting availability of the database. We don't have the option of doing into single mode, or stopping replication cluster wide.

@lvca lvca modified the milestones: 3.0.0, 3.0.x Apr 9, 2018
@tglman
Copy link
Member

tglman commented Apr 17, 2018

Hi,

This is fixed in 3.0.0, now is possible to import a database in distributed, also tests for the case are included.

Closing this

@tglman tglman closed this as completed Apr 17, 2018
@luigidellaquila luigidellaquila modified the milestones: 3.0.x, 3.0.1 May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

8 participants