Skip to content

race condition when redacted deleted way is referenced by relations #325

Closed
@tyrasd

Description

@tyrasd

Describe the bug
When a relation (like relation/10215810) references a way which has only one "deleted" version after redactions (like way/687863323), the CellIterator hits a race condition here.

To Reproduce

    OSMEntitySnapshotView
          .on(oshdb).keytables(keytables)
          .areaOfInterest(new OSHDBBoundingBox(44.0,46.0,44.5,46.5))
          .timestamps("2020-12-01")
          .osmType(OSMType.RELATION)
          .osmEntityFilter(e -> e.getId() == 10215810L)
          .count();

alternatively triggered via ohsome API:

curl -X GET "https://api.ohsome.org/v1/elements/count?bboxes=44.0%2C46.0%2C44.5%2C46.5&filter=type%3Arelation%20and%20id%3A10215810&format=json&time=2014-01-01%2F2020-01-01%2FP1Y"

Expected behavior
no error should be triggered

Error messages, logs, screenshots

java.util.NoSuchElementException
	at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1000)
	at org.heigit.bigspatialdata.oshdb.osh.OSHEntities._getModificationTimestamps(OSHEntities.java:459)
	at org.heigit.bigspatialdata.oshdb.osh.OSHEntities.getModificationTimestamps(OSHEntities.java:312)
	at org.heigit.bigspatialdata.oshdb.osh.OSHEntities.getModificationTimestamps(OSHEntities.java:246)
	at org.heigit.bigspatialdata.oshdb.util.celliterator.CellIterator.lambda$iterateByContribution$7(CellIterator.java:485)

System (please complete the following information):

  • OSHDB Version: 0.7.0-SNAPSHOT, 0.6.0, 0.5.10

Additional context
We should probably provide a backport for this bug fix for 0.6 and 0.5.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions