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

Transfer - Snapshot may be incomplete #1016

Merged
merged 3 commits into from
Nov 5, 2023
Merged

Conversation

yahavi
Copy link
Member

@yahavi yahavi commented Nov 2, 2023

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

This pull request guarantees that when adding a directory to the repository snapshot, it will happen in real-time, not deferred as a separate task. This is crucial for the following reason:

Imagine the following directory structure:

Root -> file1
Root -> dir1

Before this modification, we might upload the file and then mark "Root" as "DONE" because we've uploaded all files in Root, and the snapshot manager believes there are no children of "Root."
With this change, it ensures that "dir1" will be included in the snapshot before file1 is uploaded. This guarantees that "Root" won't be designated as completed until "dir1" is also completed.

This pull request introduces two more changes:

  1. It eliminates unnecessary snapshot manager locking in WasSnapshotLoaded to enhance efficiency.
  2. It now generates an error when an attempt is made to decrease a node's filesCount when filesCount is already at 0.

@yahavi yahavi added the bug Something isn't working label Nov 2, 2023
@yahavi yahavi self-assigned this Nov 2, 2023
@yahavi yahavi temporarily deployed to frogbot November 2, 2023 14:47 — with GitHub Actions Inactive
@yahavi yahavi marked this pull request as ready for review November 2, 2023 14:54
@yahavi yahavi requested a review from eyalbe4 November 2, 2023 14:54
Copy link
Contributor

github-actions bot commented Nov 2, 2023


@yahavi yahavi merged commit d18fb59 into jfrog:dev Nov 5, 2023
7 of 8 checks passed
@yahavi yahavi deleted the fix-snapshot branch November 5, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants