justinmclean opened a new issue, #10620: URL: https://github.com/apache/gravitino/issues/10620
### What would you like to be improved? When Gravitino is configured to use org.apache.gravitino.stats.storage.LancePartitionStatisticStorageFactory for partition statistics storage, dropping partition statistics can return success even if no statistics were actually removed. In LancePartitionStatisticStorage.java, dropStatistics(...) always returns 1 as a placeholder: That value is later converted to a boolean in StatisticManager.java, where != 0 becomes true, and the REST API returns DropResponse(true). This means clients can get a successful drop result even when: - the target partition does not exist - the statistic name does not exist - nothing was actually deleted ### How should we improve? Do not return a hard-coded success count from the Lance backend. Possible fixes: - Change the Lance dropStatistics(...) contract so it returns an accurate deleted count. - If Lance cannot provide counts, change the higher-level API to avoid interpreting a placeholder count as success. - As a safe short-term fix, have the Lance path return 0 only when the request is empty and otherwise explicitly verify whether matching rows existed before deletion, then return a real count or a trustworthy boolean. -- 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]
