TransactionTooLargeException when "Removing non-dirty resources that are not present remotely anymore"



  • From a naive POV, no, I don’t expect too much from my Android device. It has orders of magnitude more resources (CPU, memory) more than old Psion or less-old PalmPilot PDAs with which I never ran into this kind of issues.

    More topically, “other” implementation of CardDAV for Android (albeit non FLOSS) handles this dataset without such problems, so there is no absolute reason that davdroid cannot on the same device. Not sure how DMFS CardDAV-sync handles it. Does it sacrifice some transaction safety (e.g., as you wrote on another bug, the “C” in ACID)? Maybe. But it works.

    I’m not familiar with the Android database being here used. But in a “desktop SQL” frame of mind, to avoid making a “too long” SQL string, we could do something like:

    sql: CREATE TEMPORARY TABLE remoteIds (ID INTEGER PRIMARY KEY);
    java:
        for (Resource remoteResource : remoteResources) {
             // add remoteResource to remoteIds
        }
    sql: DELETE FROM tblLocalCollection WHERE SOURCE_ID NOT IN (SELECT ID FROM remoteIDs)
    sql: DROP TABLE remoteIds
    

    Or we could add to “tblLocalCollection” a column “lastSync”, and during the sync, for each remoteResource update “lastSync” to the unique ID of the currently running sync, and then do

    sql: DELETE FROM tblLocalCollection WHERE SOURCE_ID <> :current_sync_id
    

    Could we do something like that?


  • developer

    From a naive POV, no, I don’t expect too much from my Android device. It has orders of magnitude more resources (CPU, memory) more than old Psion or less-old PalmPilot PDAs with which I never ran into this kind of issues.

    Ok, but why is there a hard limit of 1 MB for transactions? I think it was feasible for early Android hardware but it hasn’t been updated.

    Could we do something like that?

    No, the database is hidden behind the ContactsProvider API. However, the process could be split up into a) detecting which entries should be deleted (by building the set difference in DAVdroid, not in the database) and b) deleting it (batch-wise).

    I’m thinking about refactoring the sync. collections logic anyway, so let’s have a look.



  • A way to avoid the issue about entirely on “good modern servers” would be to implement Collection Synchronization for WebDAV.



  • Something like http://anonscm.debian.org/cgit/users/lmamane/davdroid.git/?h=issue305 ? Need to do the same with LocalCalendar, obviously.



  • Any comment about my patch? I use it in production, seems to behave OK.



  • I refiled the original Android bugreport since Google seems to have autoclosed it.

    https://code.google.com/p/android/issues/detail?id=182292



  • @untitaker just stumbled upon this discussion. Android is such a crap.

    1MB shared limit for all IPC communication of an app? Is it a joke? 😞

    Starred your bug report.



  • @untitaker Also let’s write this bug description to author of Binder — Dianne Kyra Hackborn, who works at Google:
    hackbod@angryredplanet.com
    https://plus.google.com/105051985738280261832/about



  • No, absolutely not. That crosses a line.



  • @untitaker why? She is author of Binder subsystem. Google doesn’t fix Android bugs FOR YEARS.



  • Because that’s harassment.



  • @untitaker reporting a bug to the author of subsystem is harassment?



  • If that author is not solely responsible for maintaining it, yes.



  • @untitaker who is responsible then? Previous Issue about that bug on Google Code was closed as Obsolete.



  • Do not contact people about their work at a private address. Show some respect.



  • @untitaker Okay, who I must contact for this bug to be fixed?
    My app randomly crashes because of it.



  • There is already an issue open. Don’t take out rights for yourself you don’t have. Prioritizing your issues over others is one of them.



  • @untitaker Previous issue about that bug was closed by Google as Obsolete, so it is YOU who taken out rights for yourself you don’t have. There is NO BUG and you’re taking precious time by claiming there is. (/sarcasm)

    Seriously, do you understand the SCALE of the problem? Currently I have “hello world” program with one Activity and one Button that uses Bluetooth and crashes randomly on Nexus 6 due to that bug.

    All other critical bugs in other Android frameworks aren’t fixed for YEARS too.

    So, who I must contact at Google for them to be fixed? I’ve paid them for my developer account and bought 5 android devices.



  • I’ve paid them for my developer account and bought 5 android devices.

    This does not give you that right. I also don’t contact random employees at GitHub at their private email addresses to get problems in their Web UI fixed. When Twitter crashes I don’t email its founder, although he technically authored the site.

    If Dianne doesn’t maintain Binder anymore, I don’t really know what you’re trying to accomplish. The decision to remove that limit is not in her power. If you know that she still maintains that subsystem, you might have success getting that bug fixed, but either way, I personally wouldn’t like to be contacted that way.

    Seriously, do you understand the SCALE of the problem?

    I couldn’t care less.



  • @untitaker the difference is that GitHub and Twitter fix their bugs, bug Google doesn’t — instead it mass-closes Issues about them (and soon bugtracker itself).

    If Dianne doesn’t maintain Binder anymore, I don’t really know what you’re trying to accomplish.

    She can tell about the problem to the man who maintains Binder. Anyway, it is more effective than reporting to issue tracker no one reads and which will be closed on August 25th.


Log in to reply