Changeset: af4657f0a905 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/af4657f0a905 Modified Files: sql/storage/store.c Branch: Sep2022 Log Message:
Add timeout checks to sys.hot_snapshot(). diffs (24 lines): diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -2646,6 +2646,12 @@ hot_snapshot_write_tar(stream *out, cons char *dest_name = dest_path + snprintf(dest_path, sizeof(dest_path), "%s/", prefix); stream *infile = NULL; + lng timeoffset = 0; + QryCtx *qry_ctx = MT_thread_get_qry_ctx(); + if (qry_ctx != NULL) { + timeoffset = (qry_ctx->starttime && qry_ctx->querytimeout) ? (qry_ctx->starttime + qry_ctx->querytimeout) : 0; + } + int len; if (sscanf(p, "%[^\n]\n%n", abs_src_path, &len) != 1) { GDKerror("internal error: first line of plan is malformed"); @@ -2658,6 +2664,7 @@ hot_snapshot_write_tar(stream *out, cons char command; long size; while (sscanf(p, "%c %ld %100s\n%n", &command, &size, src_name, &len) == 3) { + GDK_CHECK_TIMEOUT_BODY(timeoffset, GOTO_LABEL_TIMEOUT_HANDLER(end)); p += len; strcpy(dest_name, src_name); if (size < 0) { _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org