Changeset: 98b4d539f5e3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/98b4d539f5e3 Modified Files: gdk/gdk_logger.c Branch: Dec2023 Log Message:
No point rotating WAL if file only 2 bytes (just endian marker). diffs (27 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -804,6 +804,10 @@ la_bat_create(logger *lg, logaction *la, /* formerly head column type, should be void */ if ((b = COLnew(0, la->tt, BATSIZE, PERSISTENT)) == NULL) return GDK_FAIL; + /* file size of 2 means only endian indicator present + * (i.e. effectively empty) */ + if (current_file_size <= 2) + return GDK_SUCCEED; if (la->tt < 0) BATtseqbase(b, 0); @@ -2518,6 +2522,12 @@ log_activate(logger *lg) rotation_unlock(lg); return GDK_FAIL; } + /* file size of 2 means only endian indicator present + * (i.e. effectively empty) */ + if (current_file_size <= 2) { + rotation_unlock(lg); + return GDK_SUCCEED; + } if (!lg->flushnow && !lg->current->next && _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org