Skip to content

Commit d8877dc

Browse files
committed
Fix incorrect Comment generation
Comments were generated incorrectly as a child comment could be created as a reply of a parent comment that no longer existed
1 parent ea08414 commit d8877dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/ldbc/snb/datagen/generator/generators/CommentGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public Stream<Pair<Comment, Stream<Like>>> createComments(RandomGeneratorFarm ra
124124

125125
// creation date
126126
long minCreationDate = Math.max(parentMessage.getCreationDate(), membership.getCreationDate()) + DatagenParams.delta;
127-
long maxCreationDate = Math.min(membership.getDeletionDate(), Dictionaries.dates.getSimulationEnd());
127+
long maxCreationDate = Collections.min(Arrays.asList(membership.getDeletionDate(), parentMessage.getDeletionDate(), Dictionaries.dates.getSimulationEnd()));
128128
if (maxCreationDate <= minCreationDate) {
129129
return Iterators.ForIterator.CONTINUE();
130130
}

0 commit comments

Comments
 (0)