Skip to content

add indices in expectation to reserve in-flight indices#463

Draft
kangclzjc wants to merge 1 commit intoai-dynamo:mainfrom
kangclzjc:reused_indics
Draft

add indices in expectation to reserve in-flight indices#463
kangclzjc wants to merge 1 commit intoai-dynamo:mainfrom
kangclzjc:reused_indics

Conversation

@kangclzjc
Copy link
Contributor

What type of PR is this?

Resolve indices conflict issue.

What this PR does / why we need it:

Hostname indices could be re-used however grove doesn't noticed that

Which issue(s) this PR fixes:

Fixes #462

Special notes for your reviewer:

Does this PR introduce a API change?

Add a creationInidices in Expectations

type ControlleeExpectations struct {
	// key is the unique identifier for the resource for which expectations are captured.
	key string
	// uidsToDelete are the set of resource UIDs that are expected to be deleted.
	uidsToDelete sets.Set[types.UID]
	// uidsToAdd are the set of resource UIDs that are expected to be created.
	uidsToAdd sets.Set[types.UID]
	// creationIndices maps UID to the index (e.g. hostname index) assigned to that creation. Optional; only set when
	// ExpectCreations is used so that callers can reserve those indices until the creation is observed.
	creationIndices map[types.UID]int
}

Additional documentation e.g., enhancement proposals, usage docs, etc.:


Signed-off-by: kangclzjc <kangz@nvidia.com>
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

Successfully merging this pull request may close these issues.

In-flight indices could be re-used while create a new pod

1 participant