OSDN Git Service

Disable transactions in sync thread to prevent deadlocks.
authorRandy Baumgarte <randy@fbn.cx>
Tue, 1 Feb 2011 14:50:21 +0000 (09:50 -0500)
committerRandy Baumgarte <randy@fbn.cx>
Thu, 24 Feb 2011 01:00:37 +0000 (20:00 -0500)
src/cx/fbn/nevernote/threads/SyncRunner.java

index 7df2044..582f902 100644 (file)
@@ -992,7 +992,7 @@ public class SyncRunner extends QObject implements Runnable {
                        \r
                        int sequence = updateSequenceNumber;\r
                        try {\r
                        \r
                        int sequence = updateSequenceNumber;\r
                        try {\r
-                               conn.beginTransaction();\r
+//                             conn.beginTransaction();\r
                                logger.log(logger.EXTREME, "Getting chunk from Evernote");\r
                                chunk = noteStore.getSyncChunk(authToken, sequence, chunkSize, fullSync);\r
                        } catch (EDAMUserException e) {\r
                                logger.log(logger.EXTREME, "Getting chunk from Evernote");\r
                                chunk = noteStore.getSyncChunk(authToken, sequence, chunkSize, fullSync);\r
                        } catch (EDAMUserException e) {\r
@@ -1036,7 +1036,7 @@ public class SyncRunner extends QObject implements Runnable {
                                updateSequenceNumber = chunk.getChunkHighUSN();\r
                                conn.getSyncTable().setLastSequenceDate(chunk.getCurrentTime());\r
                                conn.getSyncTable().setUpdateSequenceNumber(updateSequenceNumber);\r
                                updateSequenceNumber = chunk.getChunkHighUSN();\r
                                conn.getSyncTable().setLastSequenceDate(chunk.getCurrentTime());\r
                                conn.getSyncTable().setUpdateSequenceNumber(updateSequenceNumber);\r
-                               conn.commitTransaction();\r
+//                             conn.commitTransaction();\r
                        }\r
                        \r
                        \r
                        }\r
                        \r
                        \r
@@ -1046,7 +1046,7 @@ public class SyncRunner extends QObject implements Runnable {
                                pct = pct/evernoteUpdateCount;\r
                                status.message.emit(tr("Downloading ") +new Long(pct).toString()+tr("% complete."));\r
                        }\r
                                pct = pct/evernoteUpdateCount;\r
                                status.message.emit(tr("Downloading ") +new Long(pct).toString()+tr("% complete."));\r
                        }\r
-                       conn.commitTransaction();\r
+//                     conn.commitTransaction();\r
                }\r
                logger.log(logger.HIGH, "Leaving SyncRunner.syncRemoteToLocal");\r
        }\r
                }\r
                logger.log(logger.HIGH, "Leaving SyncRunner.syncRemoteToLocal");\r
        }\r