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

   ### Query engine
   
   None
   
   ### Question
   
   We are seeing some unexpected behavior when testing the `RESTCatalog`. The 
`RESTCatalog` is intended to use an `InMemoryCatalog` for testing purposes. It 
appears that the RESTCatalog and `InMemoryCatalog` are using separate instances 
of `InMemoryFileIO`, even though they point to the same warehouse location 
which makes sense. However, our expectation was that the RESTCatalog would 
share the same `InMemoryCatalog` instance (and `InMemoryFileIO` instance) 
across all tests. This would ensure the files associated with tables are 
accessible and consistent between the backed catalog and RESTCatalog.
   
   It seems that when instantiating the `RESTCatalog`, a new `InMemoryFileIO` 
instance is also created separately. As a result, test data is not actually 
shared between the two catalogs. For instance, when committing data to a table, 
the `InMemoryCatalog`'s FileIO stores the table metadata since the 
CatalogHandler delegates metadata creation. But when creating the table, the 
`RESTCatalog`'s separate `InMemoryFileIO` instance is returned as part of 
`RESTTableOperations`.
   
   This leaves the `InMemoryCatalog` storing table metadata, while the 
`RESTCatalog`'s IO stores Snapshot and ManifestList data separately.
   
   Is this the intended behavior? Or did we expect the `RESTCatalog` to share 
the same `InMemoryCatalog` and `InMemoryFileIO` instances during testing?
   
   @nastra @jackye1995 


-- 
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: issues-unsubscr...@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to