我同时升级的应用程序支持Android棒棒堂有一个问题。 该应用程序实现了一个SyncAdapter,通过内容提供者在数据库上进行写入。 与此同时,用户正在浏览装载程序从数据库读取相同数据的应用程序前端时可能会发生这种情况。 装载机也监听数据更改。的Android 5.0.1棒棒糖POSIX SQLiteLog错误11 SQLite的错误:3850
现在,如果我在预先棒棒糖设备的一切运行程序工作没有任何错误输出。
在棒棒糖代替我收到以下logcat的消息:现在
11:20:59.344 22341-22376/com.example.com E/SQLiteLog﹕ (10) POSIX Error : 11 SQLite Error : 3850
11:20:59.364 22341-22376/com.example.com E/SQLiteLog﹕ (10) POSIX Error : 11 SQLite Error : 3850
11:20:59.364 22341-22376/com.example.com E/SQLiteLog﹕ (10) POSIX Error : 11 SQLite Error : 3850
11:20:59.364 22341-22376/com.example.com E/SQLiteLog﹕ (10) POSIX Error : 11 SQLite Error : 3850
,从SQLite的文档:
(3850) SQLITE_IOERR_LOCK
The SQLITE_IOERR_LOCK error code is an extended error code for SQLITE_IOERR indicating an I/O error in the advisory file locking logic. Usually an SQLITE_IOERR_LOCK error indicates a problem obtaining a PENDING lock. However it can also indicate miscellaneous locking errors on some of the specialized VFSes used on Macs. Everything seems to work properly on a high level (that is both reads and writes are performed)
和:
A PENDING lock means that the process holding the lock wants to write to the database as soon as possible and is just waiting on all current SHARED locks to clear so that it can get an EXCLUSIVE lock. No new SHARED locks are permitted against the database if a PENDING lock is active, though existing SHARED locks are allowed to continue.
我知道SQLite的版本有已经在棒棒糖的少数主要版本中更新,所以我倾向于认为错误是由于一些新的行为我不能隔离的SQLite。但是,从更高级别的角度来看,一切似乎都能正常工作(应用程序不会崩溃,执行读取和写入操作,帧率不会下降 - 至少对人眼而言),但我不想要忽略问题才能释放应用程序,直到我确信它不会导致数据损坏或问题。
也许我对缺少关于锁和多进程数据库访问的棒棒糖的一些重要更改,但我觉得这是一个问题,关于Art/Dalvik域位于较低级别,因此必须在NDK中进行修复上下文。
有没有办法在不分配的SQLite的应用程序特定版本可能解决这一问题?是否有任何清单/ SQLite选项来避免该错误?
在此先感谢