Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
since these are in public API (:/) we need to do this in 1.2
jo...@gmail.com <jo...@gmail.com> #3
since it is already marked as deprecated, we can probably do it by now.
jo...@gmail.com <jo...@gmail.com> #4
Opening diff shortly
cr...@gmail.com <cr...@gmail.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/61 .
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
https://android-review.googlesource.com/1396827
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request from
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
yb...@google.com <yb...@google.com> #6
we are working on getting WAL into 1.1
b/62334005
ya...@google.com <ya...@google.com>
gr...@gmail.com <gr...@gmail.com> #7
yb...@google.com <yb...@google.com> #8
just use 1.1.0-alpha2 which we've shipped today.
Even though it is alpha, there are no know regressions from 1.0 (though this is the first WAL enabled release so feedback would be very much welcome)
Even though it is alpha, there are no know regressions from 1.0 (though this is the first WAL enabled release so feedback would be very much welcome)
gr...@gmail.com <gr...@gmail.com> #9
Is there a timeline on 1.1.0 will be released in earnest?
yb...@google.com <yb...@google.com> #10
we are looking forward to finalize it soon. Btw, 1.1 alpha should be stable as well, we just don't promise API compatibility between alpha versions (or major versions).
xm...@gmail.com <xm...@gmail.com> #11
We face the same problem, when query the large data user LiveData paging, and the other thread inserting many data, the query so slow, it's waiting for until the insert end
Description
Version used: 1.0.0-beta2
Devices/Android versions reproduced on: Nexus 5 / Android 6.0.1
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).
It would be nice to support concurrent database access via WAL and connection pooling, but it seems not possible in the current version.
Connection pool can be enabled by calling SQLiteDatabase.enableWriteAheadLogging() or passing ENABLE_WRITE_AHEAD_LOGGING flag to open database in framework API. However when I tried to enable WAL for Room databases in the following codes, it failed with "java.lang.IllegalStateException: Write Ahead Logging (WAL) mode cannot be enabled or disabled while there are transactions in progress."
------------------
mAppDB = Room.databaseBuilder(this, AppDatabase.class, "app-db")
.addCallback(new RoomDatabase.Callback() {
public void onCreate(@NonNull SupportSQLiteDatabase db) {
super.onCreate(db);
db.enableWriteAheadLogging();
}
public void onOpen(@NonNull SupportSQLiteDatabase db) {
super.onOpen(db);
db.enableWriteAheadLogging();
}
})
.build();
------------------
I hacked into FrameworkSQLiteOpenHelper and called FrameworkSQLiteOpenHelper.setWriteAheadLoggingEnabled(true) to enable WAL just after creating the OpenHelper. WAL and connection pool can be successfully enabled this way, but further access to the database will cause "SQLiteException: no such table: room_table_modification_log".
This is because InvalidationTracker create a temporary table called room_table_modification_log to track modifications to tables and trigger observer events, which can only be accessed in the main DB connection.
Is there a way to deal with Observers without using temporary tables? If it's not possible, how can I disable observer notifies and InvalidationTracker?