2

I feel I'm doing something wrong with the ArangoDB upgrade process. The end result from the upgrade is that my databases exist, my users exist, my collections exist, but there are no documents in my collections. Obviously this is an issue. I've had this problem occur twice, upgrading from 2.3.1 -> 2.3.4, and 2.3.4 -> 2.4 in Windows. I used the same procedure in both cases:

  1. Stopped the ArangoDB service
  2. Made a backup copy of my ArangoDB directory from Program Files
  3. Installed the new version of ArangoDB
  4. Copied the contents of the database folder from the old ArangoDB directory to the new one, excluding the system database (I feel like this is where I go wrong...)
  5. Then I open a command prompt to the bin directory and run arangod --upgrade

The upgrade output seems right to me, it finds the old databases and upgrades them, which is evident by the fact that they exist, along with the collections. But as stated before the collections are all empty. Thankfully this has been in a dev environment, but I worry about upgrading my production environment. Am I doing something wrong or is this a bug?

skinneejoe
  • 3,921
  • 5
  • 30
  • 45

2 Answers2

1

I've tried to reproduce this with the step 2.3.5 to 2.4.1 using the x64 Arango packages

What I did:

First, ran arangod from the shell with its own database directory outside of the program directory:

bin\arangod.exe c:\ee --console

Created a collection, inserted data (like the js/server/tests/aql-optimizer-rule-use-index-for-sort.js setUp()-function does) then installed the new version, ran

bin\arangod.exe c:\ee --upgrade

then

bin\arangod.exe c:\ee --console
AQL_EXECUTE("for u in UnitTestsAqlOptimizeruse_index_for_sort_XX return u")

Which gave me all 100 documents which I put into the collection.

Next I tried with running the arangod service, with the var\lib folder inside of the Porgram Files folder. I connected using arangosh, inserted the documents into the collection again, verified with

db._query("for u in UnitTestsAqlOptimizeruse_index_for_sort_XX return u").toArray();

that all data was there.

Then stopped the service, installed 2.4.1, stopped the service, and used explorer to copy over the ArangoDB 2.4.1\var\lib directory, run the arangod --upgrade with success restarted the service, and used arangosh to successfully revalidate the collection and its documents again.

So, as this seems similar to what you did, can you try to reproduce this with a minimal set of data and send us your var\lib directory?

dothebart
  • 5,972
  • 16
  • 40
  • Will do. I will try to do it this week as I'm swamped today. When you say send you the var/lib directory, where do you want me to send it to exactly? – skinneejoe Jan 21 '15 at 19:49
  • if you can put them on some webserver and send the link to hackers@arangodb.com including a link to this thread. – dothebart Jan 22 '15 at 08:36
  • 1
    Just now check my local dev arango db and all data has disappeared again without performing any upgrade whatsoever. I'm thinking something must be corrupted with my local dev instance. I'm going to try a complete removal and reinstall and see how things go in the future. – skinneejoe Jan 25 '15 at 16:41
0

As it turns out the problem was related to replication. I would replicate data from the production db to use during development. Then when I would upgrade or stop the Arango service on the dev db all the documents would vanish. BUT when I used arango backup and restore to copy the production DB data, everything worked as expected. The newest version of Arango is supposed to have fixed the issue, but I haven't had any time to test it.

skinneejoe
  • 3,921
  • 5
  • 30
  • 45