yandrey321 opened a new pull request, #11968:
URL: https://github.com/apache/ozone/pull/11968
## What changes were proposed in this pull request?
**Change.** SCM can force-delete a replica on a datanode while the replica's
Ratis pipeline is still open, for example
the source of a balancer move. A late write then recreates the container on
that datanode. With this change,
`HddsDispatcher` refuses a Ratis write to a missing container whose ID is in
`container2BCSIDMap` with
`CONTAINER_NOT_OPEN`. That map records every container created over the
pipeline and is not cleaned up on delete.
`ContainerStateMachine` ignores that result, and the client retries on a new
block.
**Key decisions.**
- **The check covers every Ratis write, not only the auto-create path the
Jira proposes.** The WriteChunk commit stage
never auto-creates, so it would get `CONTAINER_NOT_FOUND` and close the
pipeline.
- **A container found in the map is looked up again before refusing.** A
concurrent first write to a new container may
have just created it.
**Side effects.** A follower whose replica was deleted also refuses the
write instead of recreating it. Not covered: log
replay after a restart (HDDS-17435), EC writes, and explicit CreateContainer
requests.
Co-authored-by: Claude Opus 5.5 <[email protected]>
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17643
## How was this patch tested?
Unit and integration tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]