wernerdv commented on code in PR #13408:
URL: https://github.com/apache/ignite/pull/13408#discussion_r3681427845
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java:
##########
@@ -235,23 +226,20 @@ public byte policy() {
}
/**
- * Adds version to be verified on remote node.
- *
- * @param key Key for which version is verified.
- * @param dhtVer DHT version to check.
+ * @param key Key whose DHT version is verified on the remote node.
*/
- public void addDhtVersion(IgniteTxKey key, @Nullable GridCacheVersion
dhtVer) {
- if (dhtVers == null)
- dhtVers = new HashMap<>();
+ public void addDhtVersionKey(IgniteTxKey key) {
+ if (dhtVerKeys == null)
+ dhtVerKeys = new ArrayList<>();
- dhtVers.put(key, dhtVer);
+ dhtVerKeys.add(key);
}
/**
- * @return Map of versions to be verified.
+ * @return Keys whose DHT version is verified.
*/
- public Map<IgniteTxKey, GridCacheVersion> dhtVersions() {
- return dhtVers == null ? Collections.emptyMap() : dhtVers;
+ public Collection<IgniteTxKey> dhtVersionKeys() {
+ return dhtVerKeys == null ? Collections.emptyList() : dhtVerKeys;
Review Comment:
```suggestion
return F.emptyIfNull(dhtVerKeys);
```
--
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]