Skip to content

Commit

Permalink
ALS-5981: Fix possible bug where small amount of data is being dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Feb 29, 2024
1 parent 2b4b29e commit 3ef57d0
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,16 @@ public FileBackedJsonIndexStorage<Integer, ConcurrentHashMap<String, VariableVar
merged.put(key, mergedMasks);
});

ConcurrentHashMap<String, VariableVariantMasks> mergedMasks = new ConcurrentHashMap<>();
variantMaskStorage2.keys().forEach(key -> {
Map<String, VariableVariantMasks> masks2 = variantMaskStorage2.get(key);
for (Map.Entry<String, VariableVariantMasks> entry : masks2.entrySet()) {
if (!mergedMasks.containsKey(entry.getKey())) {
mergedMasks.put(entry.getKey(), new VariableVariantMasks(variantStore1.getPatientIds().length).append(entry.getValue()));
if (variantMaskStorage1.get(key) == null) {
ConcurrentHashMap<String, VariableVariantMasks> mergedMasks = new ConcurrentHashMap<>();
Map<String, VariableVariantMasks> masks2 = variantMaskStorage2.get(key);
for (Map.Entry<String, VariableVariantMasks> entry : masks2.entrySet()) {
if (!mergedMasks.containsKey(entry.getKey())) {
mergedMasks.put(entry.getKey(), new VariableVariantMasks(variantStore1.getPatientIds().length).append(entry.getValue()));
}
}
merged.put(key, mergedMasks);
}
});
return merged;
Expand Down

0 comments on commit 3ef57d0

Please sign in to comment.