mengw15 opened a new issue, #9635:
URL: https://github.com/apache/texera/issues/9635
### What happened?
`IcebergUtil.loadTableMetadata`, and `load_table_metadata` in the Python
worker, return `None` for any exception, not only for a table that does not
exist:
```scala
try {
Some(catalog.loadTable(identifier))
} catch {
case _: Exception => None
}
```
So when the catalog cannot be read (Lakekeeper restarting, a timeout), it
looks to every caller like a missing table:
- result-service answers 404 "the result of operator X is no longer stored"
for a result that exists. If the catalog fails after the result was opened, it
answers 200 with an empty page and `rowCount: 0`.
- In the computing unit, a page request fails with "No storage is found for
the given URI", which names the wrong cause, and the agent's synchronous
execution returns an empty result.
- `IcebergDocument.getCount` returns 0, and a document's iterator reads as
empty, in the JVM and in the Python worker.
Only a table or namespace that does not exist should be reported as missing.
Any other failure should reach the caller. This came up in the reviews of #9356
and #9556.
### How to reproduce?
In `ResultResourceSpec`, replace the default catalog with one whose
`loadTable` fails, then read a stored result:
```scala
class FailingCatalog(delegate: Catalog, succeeding: Int) extends
CountingCatalog(delegate) {
override def loadTable(identifier: TableIdentifier): Table = {
if (loadTableCalls.get() >= succeeding) throw new
RuntimeException("catalog unavailable")
super.loadTable(identifier)
}
}
// succeeding = 0: the catalog is unavailable
get(owner, pagesPath(eid)).getStatus shouldBe 500 // 404 on main
// succeeding = 1: the result opens, then the catalog fails
get(owner, pagesPath(eid)).getStatus shouldBe 500 // 200 with an empty table
on main
```
### Version/Branch
1.4.0-incubating-SNAPSHOT (main)
--
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]