Skip to content

Double clicking a 'remote' database continually downloads that database and does not open local version #1096

Closed

Description

@chrisjlocke

Details for the issue

So I've a list of databases...

image

Double clicking on them opens the local copy ...except for 'a.db' which always downloads a new 'version' (timestamped version)

image

and 'b' (highlighted). The others open the local copy.

I thought this might be because they were short filenames, but I've just uploaded a long filename, and that exhibits the same behaviour - it always downloads a new version.

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( version: 10 x64___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.10.0
  • 3.10.0-beta*
  • 3.9.1
  • Other: ___

I have also:

Activity

  1. chrisjlocke commented on Aug 21, 2017

    @chrisjlocke
    MemberAuthor

    Oops. Deleting 'remotedbs.db' has cured this. Was obviously some database change between the betas and the new version.

  2. justinclift commented on Aug 21, 2017

    @justinclift
    Member

    Ahhh yeah, good point. I'd forgotten about that too. 😄

  3. chrisjlocke commented on Aug 22, 2017

    @chrisjlocke
    MemberAuthor

    Reopening this, as its doing it again. Its on a database I only uploaded today, so there is an issue somewhere. (This is on non-nightly 3.10.0)

    Some checksum doesn't match across the two databases.
    Out of 10 databases I have, its only doing it on one.

  4. justinclift commented on Aug 22, 2017

    @justinclift
    Member

    Interesting. k, we might need to wait for @MKleusberg to get back from his hiking trip. 😄

  5. MKleusberg commented on Sep 1, 2017

    @MKleusberg
    Member

    @chrisjlocke Can you send me you remotedbs.db file along with the file name of the database that's having the problem?

  6. chrisjlocke commented on Sep 1, 2017

    @chrisjlocke
    MemberAuthor

    Will do. Its doing it on 'users only.db'. Actually, have a link to it.

    image

    https://db4s-beta.dbhub.io/chrisjlocke/remotedbs.db

    Do you need any files in the temp folder, or a copy of the actual 'users only.db' ?

  7. MKleusberg commented on Sep 1, 2017

    @MKleusberg
    Member

    I can't see any problem with your remotedbs.db file ☹️ I thought it might be because of the space character in the file name (' ' vs '%20' or something like that) but that bit appears to be working correctly and your initial 'a.db' file didn't have any spaces in it...

    If @justinclift is okay with starting the build scripts, I could write a version with extra debug output.

  8. justinclift commented on Sep 1, 2017

    @justinclift
    Member

    Yep, that's no worries at all. 😄

    Hmmm, @chrisjlocke mentioned that Windows has a problem with debug output not showing up. Maybe log to a file (or database 😉)?

  9. MKleusberg commented on Sep 1, 2017

    @MKleusberg
    Member

    Or use this method 😄

  10. 5 remaining items

  11. justinclift commented on Sep 1, 2017

    @justinclift
    Member

    On the server console the matching output is:

    2017/09/01 14:01:32 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:01:33 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:01:34 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:04:49 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:04:50 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:04:51 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:04:52 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:04:53 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:04:53 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:04:54 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:05:47 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:05:47 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:05:48 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:05:49 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    2017/09/01 14:05:49 'chrisjlocke/users only.db' downloaded by user 'chrisjlocke', 7168 bytes
    

    More in-depth logging can be added to the server side if that'd be useful.

  12. chrisjlocke commented on Sep 1, 2017

    @chrisjlocke
    MemberAuthor

    I knew i'd clicked it several times....but blimey..... ;)

  13. MKleusberg commented on Sep 1, 2017

    @MKleusberg
    Member

    Ahhh hmmm, it's sort of obvious now 😉 So thanks to both of you! The problem is basically that we don't have any version control implemented yet. I assume both the a.db and the users only.db file have multiple commits whereas the other databases don't. Correct? 😄

    There's a very easy fix and a slightly more complicated but better fix for this. I'll try the better one first and if that doesn't work as expected, I'll fall back to the easy hack-ish one for now.

  14. chrisjlocke commented on Sep 1, 2017

    @chrisjlocke
    MemberAuthor

    Doh. Makes sense. So the commit has changed, but not in the 'link', etc. Aah.

  15. MKleusberg commented on Sep 1, 2017

    @MKleusberg
    Member

    Just pushed the 'better' solution to this 😄 The next time you're opening one of those files it's now going to ask you in a message box if you want to open the old local version or download the new remote version. If you choose to open the old local version it will just open it, downloading nothing, and ask again the next time you're opening the file. If you choose to open the new remote version it will delete your local copy, redownload, and the issue will be gone.

    In your case with the many checkouts that's probably a bit confusing but in theory it should prevent this situation in the future entirely 😉

  16. chrisjlocke commented on Sep 1, 2017

    @chrisjlocke
    MemberAuthor

    Will test that. Thanks for implimenting this. :)

  17. MKleusberg commented on Sep 1, 2017

    @MKleusberg
    Member

    It's still not perfect though 😉 Pushing a new commit and then double clicking the database file will pop up the same message box. But that's a different issue...

  18. justinclift commented on Sep 1, 2017

    @justinclift
    Member

    Hmmm, it should be fairly easy to add something to the server for returning the commit history for a given database branch. Maybe something like /commitlist/path/to/database.sqlite?branch=foo or /commits?owner=foo&folder=bar&db=baz.sqlite&branch=barf (either way is probably workable).

    In response it'd send back a JSON list with all of the commit history for the given branch.

    It's actually pretty trivial to assemble that, as it's already stored in the database in assembled form, ready for use. 😀

  19. MKleusberg commented on Sep 2, 2017

    @MKleusberg
    Member

    I don't even think that's necessary for now. With sqlitebrowser/dbhub.io#100 I'd have all that I need to fix that last issue (I think).

  20. added this to the 3.10.1 - Gaaah! milestone on Sep 2, 2017
  21. justinclift commented on Sep 18, 2017

    @justinclift
    Member

    Should this be closed?

  22. MKleusberg commented on Sep 19, 2017

    @MKleusberg
    Member

    Yeah, I'm just going to close this 😄 I'm pretty sure it's fixed. If it's still broken it's probably a new issue 😉

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions