xtern commented on code in PR #1434:
URL: https://github.com/apache/ignite-3/pull/1434#discussion_r1053241498
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/trait/IgniteDistributions.java:
##########
@@ -62,44 +63,28 @@ public static IgniteDistribution broadcast() {
return BROADCAST;
}
- /**
- * Affinity.
- * TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
- *
- * @param key Affinity key.
- * @param cacheName Affinity cache name.
- * @param identity Affinity identity key.
- * @return Affinity distribution.
- */
- public static IgniteDistribution affinity(int key, String cacheName,
Object identity) {
- // TODO: fix cacheId
- return affinity(key, 0, identity);
- }
-
/**
* Affinity.
* TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
*
* @param key Affinity key.
- * @param cacheId Affinity cache ID.
- * @param identity Affinity identity key.
+ * @param zoneId Affinity zone ID.
* @return Affinity distribution.
*/
- public static IgniteDistribution affinity(int key, int cacheId, Object
identity) {
- return hash(ImmutableIntList.of(key),
DistributionFunction.affinity(cacheId, identity));
+ public static IgniteDistribution affinity(int key, UUID tableId, Object
zoneId) {
Review Comment:
Production code uses tableId (UUID) instead of zoneId and we are not sure
what type it will be in the future.
But, since we already have tableId (to calculate colocation hash) we can
completely remove zoneId from current affinity distribution implementation and
add some extra todo.
WDYT?
Personally, I don't like this because it will require more work to do in
https://issues.apache.org/jira/browse/IGNITE-18426 )
--
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]