Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should retract set latest=true on latest non-retracted version? #140

Open
alaniwi opened this issue Nov 25, 2019 · 0 comments
Open

should retract set latest=true on latest non-retracted version? #140

alaniwi opened this issue Nov 25, 2019 · 0 comments

Comments

@alaniwi
Copy link
Contributor

alaniwi commented Nov 25, 2019

I see there is code to set latest=false when retracting a dataset version:

metadata.put(QueryParameters.FIELD_LATEST, new String[] {"false"} );

but if the version which is being retracted has latest=true and earlier non-retracted versions exist, then it might be helpful also to restore the latest=true on the latest non-retracted version -- so that it will be found when searching without "show all versions" -- rather than leave it without any versions of the dataset having latest=true.

If this is done, then it would also be necessary to ensure that when publishing a new later version, it would set latest=false on whichever earlier version has latest=true, not necessarily the latest existing version (which might have been retracted). I'm not sure if the existing code would need to be modified to achieve this, but see the lines following this comment:

// case 1) publishing a newer version:
// republish previous version with "latest"=false

For example:

  • publish v1, sets v1:latest=true
  • publish v2, sets v2:latest=true and v1:latest=false
  • retract v2, sets v2:latest=false and v1:latest=true (as well as v2:retracted=true)
  • publish v3, sets v3:latest=true and v1:latest=false (rather than v2:latest=false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant