This is an automated email from the ASF dual-hosted git repository. tuhaihe pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry-backup.git
commit f9e80483583e14fefad0bb467c95e72aed97bc44 Author: chenqiang <[email protected]> AuthorDate: Wed Apr 29 16:17:57 2026 +0800 gpbackman: wrap non-NotExist os.Stat error with path context in OpenHistoryDB. Previously a permission-denied or I/O failure on the history DB path returned the bare os.Stat error, which gave no hint about which operation or path failed. Wrap it with fmt.Errorf using %w so errors.Is/As still work while surfacing "stat history db <path>" in the message, matching the friendly tone of the ErrNotExist branch. --- gpbackman/gpbckpconfig/utils_db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpbackman/gpbckpconfig/utils_db.go b/gpbackman/gpbckpconfig/utils_db.go index 07e307d9..6a834010 100644 --- a/gpbackman/gpbckpconfig/utils_db.go +++ b/gpbackman/gpbckpconfig/utils_db.go @@ -49,7 +49,7 @@ func OpenHistoryDB(historyDBPath string) (*sql.DB, error) { historyDBPath, ) } - return nil, err + return nil, fmt.Errorf("stat history db %q: %w", historyDBPath, err) } // mode=rw opens an existing database for read+write but never creates one. db, err := sql.Open("sqlite3", "file:"+historyDBPath+"?mode=rw") --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
