Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A regression from #100, on Windows: restoring a snapshot of a save that has subfolders fails most of the time, and a game deleting one of its own save folders can be refused in the same way.
Seen as:
TestAdversarial_AwkwardFilenamesSurviveASnapshotRoundTripandTestAdversarial_RepeatedRollbackIsIdempotentfail 7 runs in 10 ondev-public, withrestore snapshot …: clear target dir: unlinkat …\saves\b: The process cannot access the file because it is being used by another process.dev-public's merges with those two tests: 0 failures up to e2e: branchHolds reads a branch's newest snapshot, as it says #98, failures from watcher: a subfolder missed when it was created is watched on the next change in its parent #100 on. The restore is safe either way: it puts the save back and says so.dev-public: restoring Terraria (saves inPlayers\) failed 2 times in 5. A script standing in for the game, deletingPlayers\Backupswhile OpenSave watched, was refused ("Device or resource busy").Why. Since #100, a Write on a watched folder makes the watcher list that folder (
checkFolders), to find subfolders whose Create was missed. On Windows,os.ReadDiropens the folder withoutFILE_SHARE_DELETE, and while it is open the folder can't be removed. Every file a restore deletes is a Write on its folder, so the watcher was listing the very folders the restore was about to remove. A game emptying a folder of its own is the same race.The change.
fsx.ReadDirSharedlists a folder through a handle opened withFILE_SHARE_DELETE, falling back toos.ReadDirif that open fails, asfsx.OpenShareddoes for files.checkFoldersuses it. Nothing else changes: on other systems an open folder never blocked removing it, and there it isos.ReadDir.Measured before writing it: a folder held by
os.Opencan't be removed (the error above), while one held by the shared handle can, and the listing is the same.Tests:
fsx/readdirshared_windows_test.go: a folder being listed can be removed; the listing matchesos.ReadDir; a missing folder is "not exist".TestSubfolder_*tests and thewatcher,fsxandsnapshotpackages pass.Checks:
dev-public(951cee6), the full Windows unit and e2e suites pass, with one exception:TestBuildManifest_SurvivesFilesVanishingDuringTheWalk(delta), which fails in over half of runs on this PC ondev-publicanddevalike and isn't touched here. After Games from your other devices set themselves up again; trust your own devices to choose folders #132's last commit (a fix to how the catalogue check reads the index after a rebuild),presets,p2p,daemonandapiand the folder, offer and rollback e2e tests were run again, and pass.-raceon Linux (WSL Ubuntu) passes forpresets,daemon,p2p/...,api,store,cliapp,fsx,watcherandsnapshot, and for the folder, offer and rollback e2e tests.TestSignIn_AnOldAttemptsTimerLeavesTheNewListeneronce reported a data race in its cleanup; it does the same on plaindev-public.go vetfor Linux and macOS.watcher.go, but nowhere nearcheckFolders.cc @ChakraFusion, since it's #100's check. The folder check itself is untouched; only how it reads the folder changes.