couchbase / couchbase-lite-android-ce

The community edition of couchbase lite for android
Apache License 2.0
9 stars 1 forks source link

CBL 2.5.0 is not able to migrate db for 1.4 #1

Closed hrajput89 closed 5 years ago

hrajput89 commented 5 years ago

TestServer App crashes while loading CBL 1.4 db.

Python client logs -

python_client.log

CBL logs -

logs_1559652425.zip

adb_logs.log

Test command -

  1. git clone https://github.com/couchbaselabs/mobile-testkit.git
  2. git checkout feature/cbl-upgrade-testing
  3. pytest -rsx -s --skip-provisioning --timeout 3600 --base-liteserv-version=1.4 --upgraded-liteserv-version=2.5.0-224 --liteserv-host=192.168.0.144 --liteserv-port=8080 --sync-gateway-version=2.5.0-269 --mode=cc --server-version=6.0.0-1693 --liteserv-platform=android --enable-file-logging testsuites/CBLTester/upgrade_tests/test_cbl_upgrade.py

CBL db is available at - https://github.com/couchbaselabs/mobile-testkit/blob/feature/cbl-upgrade-testing/CBLClient/Apps/CBLTestServer-Android/app/src/main/assets/travel-sample-1.4.cblite2.zip

euniceatcouchbase commented 5 years ago

the python log shows the code failed at db.create, didn't see how it's related to the database file-copy in the code? Have you tried to run the steps manually? Because I used the ToDo app tested 1.4 -> 2.5 unencrypted db upgrade manually, it didn't have an issue to load old version of db.

hrajput89 commented 5 years ago

the python log shows the code failed at db.create, didn't see how it's related to the database file-copy in the code? Have you tried to run the steps manually? Because I used the ToDo app tested 1.4 -> 2.5 unencrypted db upgrade manually, it didn't have an issue to load old version of db.

Yes, I've checked. Create method works like this - if a db with that name doesn't exist than it creates a db with that name and returns db object. If db with the given name exist, it just open up (in case db is of lower cal version, it tries to migrate it) and returns db object. If you check the logs, it was migrating cbl-1.4 db to 2.5, when it crashed. For much more clarity I've added add log.

It seems there is a flaw in cbl logger. It is not able to dump data fast enough to catch app crash.

Let me know if you have any other doubt

bmeike commented 5 years ago

We'll need the logcat to get anywhere with this. Please attach it.

hrajput89 commented 5 years ago

I've logged Jira ticket - https://issues.couchbase.com/browse/CBL-204.

Closing ticket here.