Skip to content

Conversation

adreed-msft
Copy link
Member

Description

Wanted to burn something quick down to get myself back up to speed post vacation.

  • Feature / Bug Fix: This PR corrects a long-standing issue in AzCopy with the folder creation tracker: State would overlap onto the first "part" of the plan file, since that's the only part that the folder tracker had access to. This is the direct cause of issues with dhanashree's prior PR to prevent too many calls to create directories.

Type of Change

  • Bug fix
  • New feature
  • Documentation update required
  • Code quality improvement
  • Other (describe):

How Has This Been Tested?

Adjusted the existing test for the folder tracker

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in AzCopy's folder creation tracker where state would incorrectly overlap onto the first "part" of the plan file. The fix ensures proper isolation between different job parts by including part number information in folder registration and tracking.

  • Updates the folder tracker to accept and use part number information
  • Replaces direct plan references with a fetch function to avoid dependency cycles
  • Modifies the tracker's internal storage to use a composite index including part number

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
ste/mgr-JobPartMgr.go Adds part number parameter to folder tracker registration
ste/mgr-JobMgr.go Updates folder tracker initialization to use job manager instead of plan
ste/folderCreationTracker.go Implements composite indexing with part numbers and fetch function pattern
ste/folderCreationTracker_test.go Updates test to validate proper state isolation between job parts

@gapra-msft gapra-msft marked this pull request as draft August 7, 2025 16:06
@adreed-msft adreed-msft marked this pull request as ready for review August 11, 2025 18:48
@dphulkar-msft
Copy link
Member

Is there any way we could add a test case for this?

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

Successfully merging this pull request may close these issues.

3 participants