rdblue commented on pull request #2961:
URL: https://github.com/apache/iceberg/pull/2961#issuecomment-903937976


   I agree with much of what @rymurr said. I think it is good that snapshots 
are immutable. I think of the tags (and later, branches) feature as a way of 
referring to snapshots and keeping track of them, just like references in git.
   
   For the spec, what I've been thinking is to add a new map that tracks 
snapshots with names as keys and an object of data. Something like this:
   
   ```
     "named-snapshots": {
       "current": { "snapshot-id": 1234..., "type": "branch" },
       "dev": { "snapshot-id": 1235..., "type": "branch" },
       "monthly-2021-06-01": { "snapshot-id": 1233..., "type": "tag", 
"lifecycle": "snapshot" },
       "audit-2021-q2": { "snapshot-id": 1232..., "type": "tag", "lifecycle": 
"independent" }
     }
   ```
   
   Things to note about this example:
   * The current version is a normal branch. We'd need to keep 
`current-version-id` until v3
   * The "type" determines what can be done. Branches can be updated just like 
"current" and tags are static
   * Tags need information about lifecycle. Some tags are just convenience 
names that should be removed when a snapshot is expired (lifecycle=snapshot) 
but others are snapshots that should be retained forever (lifecycle=independent)
   * Using a JSON object for the tag/branch metadata allows us to evolve it 
more easily, unlike `map<string, long>`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to