Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data for Worker overload #2721

Closed
bmarty opened this issue Jan 26, 2021 · 2 comments · Fixed by #2755
Closed

Data for Worker overload #2721

bmarty opened this issue Jan 26, 2021 · 2 comments · Fixed by #2755
Assignees
Milestone

Comments

@bmarty
Copy link
Member

bmarty commented Jan 26, 2021

Serialized data we pass to the worker are limited in size.

On crowded encrypted rooms it can lead to this error:

E/SyncThread: java.lang.IllegalStateException: Data cannot occupy more than 10240 bytes when serialized
        at androidx.work.Data.toByteArrayInternal(Data.java:417)
        at androidx.work.Data$Builder.build(Data.java:846)
        at org.matrix.android.sdk.internal.worker.WorkerParamsFactory.toData(WorkerParamsFactory.kt:44)
        at org.matrix.android.sdk.internal.crypto.crosssigning.DefaultCrossSigningService.onUsersDeviceUpdate(DefaultCrossSigningService.kt:809)
        at org.matrix.android.sdk.internal.session.room.summary.RoomSummaryUpdater.update(RoomSummaryUpdater.kt:150)
        at org.matrix.android.sdk.internal.session.room.summary.RoomSummaryUpdater.update$default(RoomSummaryUpdater.kt:67)
        at org.matrix.android.sdk.internal.session.sync.RoomSyncHandler.handleJoinedRoom(RoomSyncHandler.kt:189)
        at org.matrix.android.sdk.internal.session.sync.RoomSyncHandler.handleRoomSync(RoomSyncHandler.kt:110)
        at org.matrix.android.sdk.internal.session.sync.RoomSyncHandler.handle(RoomSyncHandler.kt:93)

This part has to be reworked to avoid this overflow.

P1: Once this error occurs, the sync thread is broken, so new messages does not arrive, and only a clear cache seems to fix the problem

@bmarty bmarty added the p1 label Jan 26, 2021
@bmarty bmarty added this to the Sprint 19 milestone Jan 26, 2021
@bmarty bmarty self-assigned this Jan 26, 2021
bmarty added a commit that referenced this issue Jan 26, 2021
Pass the roomId instead of the list of userIds to the worker, to limit the size of the data
@bmarty
Copy link
Member Author

bmarty commented Jan 27, 2021

bmarty added a commit that referenced this issue Feb 2, 2021
bmarty added a commit that referenced this issue Feb 2, 2021
@bmarty
Copy link
Member Author

bmarty commented Feb 2, 2021

Fixed in Element 1.0.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant