Skip to content

Commit

Permalink
burst buffering: exit define mode before file close
Browse files Browse the repository at this point in the history
  • Loading branch information
wkliao committed Mar 17, 2024
1 parent 87a20ce commit 46d977b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/drivers/ncbbio/ncbbio_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ ncbbio_close(void *ncdp)
* Putlist and metadata index also needs to be cleaned up
*/
if (ncbbp->inited) {
if (ncbbp->flag & NC_MODE_DEF) { /* exit define mode first */
err = ncbbp->ncmpio_driver->enddef(ncbbp->ncp);
if (status == NC_NOERR) status = err;
}

/* Close log file */
err = ncbbio_log_close(ncbbp, 1);
if (status == NC_NOERR) status = err;
Expand Down

0 comments on commit 46d977b

Please sign in to comment.