Skip to content

IDatastreamStore getLatestVersionEntry default function assumes sorted query #343

Description

@lemonman96

Output from selectEntries is not guaranteed to be sorted and this function assumes it is:

public default Entry<DataStreamKey, IDataStreamInfo> getLatestVersionEntry(String sysUID, String outputName)
{
var entryOpt = selectEntries(new DataStreamFilter.Builder()
.withSystems()
.withUniqueIDs(sysUID)
.done()
.withOutputNames(outputName)
.build())
.findFirst();
return entryOpt.isPresent() ? entryOpt.get() : null;
}

This results in stale datastreams being returned for some drivers (observed via the postgis driver). We will need a max query here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions