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

Remove isWriteOperation on container delete #23331

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions sdk/data/azcosmos/cosmos_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ func (c *ContainerClient) Delete(
}

operationContext := pipelineRequestOptions{
resourceType: resourceTypeCollection,
resourceAddress: c.link,
isWriteOperation: true,
resourceType: resourceTypeCollection,
resourceAddress: c.link,
Copy link
Member

Choose a reason for hiding this comment

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

A delete is a Write operation. And we have tests that use this. The Write operation is used to define routing (write operations can only be sent to the primary region)

Please verify with the service team the origin of the HTTP 500.

Copy link
Member

Choose a reason for hiding this comment

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

isWriteOperation does not modify the request that is sent, it is used to know which region to route it to.

func (lc *locationCache) resolveServiceEndpoint(locationIndex int, isWriteOperation, useWriteEndpoint bool) url.URL {

}

path, err := generatePathForNameBased(resourceTypeCollection, c.link, false)
Expand Down