echonesis opened a new pull request, #11179:
URL: https://github.com/apache/ozone/pull/11179

   ## What changes were proposed in this pull request?
   `Pipeline.equals()` compares the pipeline ID, replication configuration, and 
the set of datanodes. However, `Pipeline.hashCode()` previously included the 
complete `nodeStatus` map, whose values contain mutable datanode report 
timestamps.
   
   As a result, two pipelines with the same ID, replication configuration, and 
datanodes could be equal while producing different hash codes if their report 
timestamps differed. This violated the `equals()` and `hashCode()` contract.
   
   This PR:
   * Preserves the existing `Pipeline.equals()` semantics while replacing 
`EqualsBuilder` with direct comparisons.
   * Changes `Pipeline.hashCode()` to use only the pipeline ID.
   * Removes the unused `EqualsBuilder` and `HashCodeBuilder` imports.
   * Adds a regression test covering equal pipelines with different 
`nodeStatus` values.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16353
   
   ## How was this patch tested?
   
   Local Test
   ```
   mvn -pl :hdds-common -am test \
     -Dtest=TestPipeline \
     -Dsurefire.failIfNoSpecifiedTests=false \
     -DskipShade -DskipRecon -DskipDocs
   ```
   
   GitHub Actions CI: 
https://github.com/echonesis/ozone/actions/runs/33425156442
   
   Generated-by: Codex (GPT-5)


-- 
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]

Reply via email to