rdblue commented on code in PR #18503:
URL: https://github.com/apache/iceberg/pull/18503#discussion_r4567970661


##########
format/spec.md:
##########
@@ -1251,11 +1251,13 @@ A snapshot consists of the following fields:
     | _required_ | **`sequence-number`**        | A monotonically increasing 
long that tracks the order of changes to a table |
     | _required_ | **`timestamp-ms`**           | A timestamp when the 
snapshot was created, used for garbage collection and table inspection |
     | _required_ | **`root-manifest`**          | The location of the root 
manifest for this snapshot |
+    | _required_ | **`root-manifest-size-in-bytes`** | Size of the root 
manifest file in bytes |
     | _required_ | **`summary`**                | A string map that summarizes 
the snapshot changes, including `operation` as a _required_ field (see below) |
     | _optional_ | **`schema-id`**              | ID of the table's current 
schema when the snapshot was created |
     | _required_ | **`first-row-id`**           | The first `_row_id` assigned 
to the first row in the first data file in the first manifest, see [Row 
Lineage](#row-lineage) |
     | _required_ | **`added-rows`**             | The upper bound of the 
number of rows with assigned row IDs, see [Row Lineage](#row-lineage) |
-    | _optional_ | **`key-id`**                 | ID of the encryption key 
that encrypts the root manifest key metadata |
+    | _optional_ | **`key-id`**                 | ID of the encryption key 
that encrypts the root manifest |

Review Comment:
   Okay, so we are now using `encrypted-key-metadata` and `encrypted-by-id`. 
That's good.
   
   That means this field is no longer expected to be used. The next question is 
whether we should allow it in v4. Since we don't think it is a good idea, I 
think that we should not allow it. As a result, the read requirement is 
optional and the write requirement is empty (do not produce). It would be more 
clear to use read and write requirements columns.
   
   The argument against not allowing `key-id` is that we don't want to tie 
encryption requirements to v4. But I think a spec update like this is already 
needed because writers are required to preserve `encrypted-key-metadata` and 
`encrypted-by-id`. As long as we are doing that, then I think we should 
standardize on a single way to manage key metadata, which is to embed 
snapshot-specific key metadata here, and have shared keys to decrypted those 
keys in the key table.



-- 
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