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

Fix watch replay button sometimes not loading the replay on first click #30895

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

peppy
Copy link
Member

@peppy peppy commented Nov 27, 2024

Closes #28497.

Note that this will force a refresh delay in the previous fail case, via

perform(r.FindWithRefresh<T>(ID)!);
RealmLiveStatistics.USAGE_ASYNC.Value++;

This is intentional – refresh is sometimes required and using RealmLive ensures it happens if and only if required. The blocking operation time is reduced drastically with #30893 to the point that makes it hard to trigger this bug anymore with the provided database.

This also optimises the manager classes to better support `Live` usage
where the managed object is already in a good state (ie. doesn't require
re-fetching).
@peppy peppy added the realm deals with local realm database label Nov 27, 2024
@bdach bdach self-requested a review November 28, 2024 12:06
Comment on lines +562 to +566
if (beatmapInfo.IsManaged)
{
beatmapInfo = beatmapInfo.Detach();
}
else if (refetch || missingFiles)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes me nervous but I don't have any concrete reason to doubt it so I'm just gonna hope this breaks nothing

@bdach bdach merged commit d0e80ce into ppy:master Nov 28, 2024
7 of 10 checks passed
@peppy peppy deleted the watch-replay-reliability branch December 2, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
realm deals with local realm database size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Watch Replay" button after fail turns green before it's ready
2 participants