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

Sync using an arguments file fails frequently. [p4vfs -x {file} sync] #42

Open
pmintusEA opened this issue Jun 7, 2024 · 2 comments
Open

Comments

@pmintusEA
Copy link

We very heavily rely on argument files when performing a syncing using p4.exe. It allows us to filter out unnecessary files. When we ported over to p4vfs.exe we continued to use an argument file. However I have recently noticed that they don't always succeed.

The more files to sync, the greater the chance of failure. I cannot tell if there is a safe minimum.

This seems to only occur when using an arguments file. I have not been able to reproduce the issue without an arguments file. sync and populate with an arguments file both have the same issue.

At around 25,000 files I see about a 1/6 success rate.

When it fails I have seen the following:

  • Exit code will always be 1
  • All files are missing. I have not encountered a partial sync.
  • The p4 have table may sometimes be updated
  • The error below may sometimes be printed out
  • It might fail immediately, or it may first print out all of the files in the arguments file and then after a while fail
SocketModelClient.SendCommand exit with exception: One or more errors occurred.

I have attached a powershell script that I have been using to verify this. To use this script, you will have to have your p4 environment set up so that executing p4vfs sync would just start a sync.

# Tests p4vfs populate using an argument file to perform the sync
# .\p4vfs-test.ps1 -max 10000 will limit the sync to 10000 files
# .\p4vfs-test.ps1 -nofile will not use an argument file
# .\p4vfs-test.ps1 -sync will use sync instead of populate

p4vfs-test.ps1.txt

@jessk-msft
Copy link
Collaborator

jessk-msft commented Jun 12, 2024

Thank you for the details. I'm sure that we haven't stress tested the argument file support enough. Seems like a fairly consistent problem, and we can probably start by confirming it with a new unit test.
Can you provide a bit more info:

  • Have you tried using p4vfs sync -t to perform the sync in the p4vfs process, instead of sending arguments to the windows service? This may indicate if the problem is limited to SocketModelClient.SendCommand

  • Does a failed sync result in inconsistent workspace files? For example, if you do a p4 reconcile after a failed p4vfs -x <file> sync do you see local files that don't match the #have.

  • Are you using any other p4vfs sync arguments as well in your p4vfs-test.ps1. For example, a Single mode sync (ie p4vfs populate) could be quite inconsistent.

Regards,
-Jess

@pmintusEA
Copy link
Author

Hi,

I tested p4vfs sync -t and it seems to be working correctly.

Thanks!

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

No branches or pull requests

2 participants