thswlsqls opened a new issue, #18034:
URL: https://github.com/apache/iceberg/issues/18034

   **Apache Iceberg version**
   main @ 9d7b2c52f
   
   **Query engine**
   None — the bug is in the Nessie catalog client, so it is engine-agnostic.
   
   **Please describe the bug**
   `NessieIcebergClient.listNamespaces(Namespace)` reads two different commits 
in one call, so listing a namespace another client just created fails with 
`NoSuchNamespaceException`.
   
   The parent existence check calls 
`api.getContent().reference(getReference())` 
(`nessie/src/main/java/org/apache/iceberg/nessie/NessieIcebergClient.java` line 
276). `getReference()` returns the `Reference` the client cached when it first 
resolved the ref, hash included, so the server answers from that older commit.
   
   The child listing a few lines below uses `withReference(api.getEntries())` 
(line 291), which sends only the ref name for a mutable reference, so the 
server answers from the HEAD of the ref.
   
   `loadNamespaceMetadata()` in the same class already reads namespace content 
through `withReference(api.getContent())` (line 380).
   
   **Steps to reproduce**
   1. Open two Nessie catalogs on the same server and branch; let both resolve 
the ref.
   2. From client A, create `db1`, then `db1.sub1`.
   3. From client B, call `listNamespaces(Namespace.of("db1"))`.
   
   Expected `[db1.sub1]`, actual `NoSuchNamespaceException: Namespace does not 
exist: db1`.
   
   **Additional context**
   The check came in with #12901 (fix for #12875).
   


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