Skip to content

Commit

Permalink
Merge pull request #22515 from taosdata/fix/TD-25819-2
Browse files Browse the repository at this point in the history
fix(tsdb/file): save errno for shell reporting
  • Loading branch information
gccgdb1234 committed Aug 23, 2023
2 parents 53e3410 + 345743a commit 8c4062c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ int32_t tsdbOpenFile(const char *path, int32_t szPage, int32_t flag, STsdbFD **p
pFD->flag = flag;
pFD->pFD = taosOpenFile(path, flag);
if (pFD->pFD == NULL) {
int errsv = errno;
const char *object_name = taosDirEntryBaseName((char *)path);
long s3_size = s3Size(object_name);
if (!strncmp(path + strlen(path) - 5, ".data", 5) && s3_size > 0) {
Expand All @@ -49,7 +50,7 @@ int32_t tsdbOpenFile(const char *path, int32_t szPage, int32_t flag, STsdbFD **p
goto _exit;
}
} else {
code = TAOS_SYSTEM_ERROR(errno);
code = TAOS_SYSTEM_ERROR(errsv);
taosMemoryFree(pFD);
goto _exit;
}
Expand Down

0 comments on commit 8c4062c

Please sign in to comment.