[ 
https://issues.apache.org/jira/browse/HDDS-12822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Andika updated HDDS-12822:
-------------------------------
    Description: 
Currently OmKeyInfo#isKeyInfoSame compares the OmKeyInfo objectID last, 
although objectID is one of the most likely changed attribute. Ideally, the 
equality check should compare the attributes that are most likely changed first 
so that the results can be short-circuited faster. We can also prioritize 
primitives (int, long) attributes first, then string, then list (dynamic list 
like ACLs), and finally maps (immutable map like metadata should comes before 
mutable map like tags).

We can try to change the ordering of OmKeyInfo#isKeyInfoSame and run some 
micro-benchmarks (e.g. using JMH) to see the performance improvement.

  was:
Currently OmKeyInfo#isKeyInfoSame compares the OmKeyInfo objectID last, 
although objectID is one of the most likely changed attribute. Ideally, the 
equality check should compare the attributes that are most likely changed first 
so that the results can be short-circuited faster. We can also prioritize 
primitives (int, long) attributes first, then string, then list (dynamic list 
like ACLs), and finally maps (immutable map like metadata should comes before 
mutable map like tags).

We can try to change the ordering of OmKeyInfo#isKeyInfoSame and run some 
benchmarks to see the performance improvement.


> Short-circuit in OmKeyInfo equality check
> -----------------------------------------
>
>                 Key: HDDS-12822
>                 URL: https://issues.apache.org/jira/browse/HDDS-12822
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Ivan Andika
>            Assignee: Ivan Andika
>            Priority: Major
>
> Currently OmKeyInfo#isKeyInfoSame compares the OmKeyInfo objectID last, 
> although objectID is one of the most likely changed attribute. Ideally, the 
> equality check should compare the attributes that are most likely changed 
> first so that the results can be short-circuited faster. We can also 
> prioritize primitives (int, long) attributes first, then string, then list 
> (dynamic list like ACLs), and finally maps (immutable map like metadata 
> should comes before mutable map like tags).
> We can try to change the ordering of OmKeyInfo#isKeyInfoSame and run some 
> micro-benchmarks (e.g. using JMH) to see the performance improvement.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to