Skip to content

Always sort data before saving #7

Open

Description

@MrCreosote

This has 2 benefits:

  • Distributes the computational load from sorting across many nodes rather than localizing it to the workspace server
  • Prevents most cases of the error caused by using too much memory to store keys for maps while sorting the object

Re 2), note that if the object has map keys that are workspace refs, but not UPAs, that might trigger a resort, so the client application may need to swap UPAs for refs to avoid a workspace-side sort.

If the object is sorted already, this would add a low cost scan step to the save.

Note that the sorting should not be done via deserializing the object - use the java sorting code that the workspace uses to sort.

See kbaseapps/DataFileUtil#77

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions