Changeset: ae8e5c733f8b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ae8e5c733f8b
Modified Files:
        gdk/gdk_bbp.c
        gdk/gdk_storage.c
        monetdb5/modules/mal/tablet.c
        sql/server/sql_mvc.c
        sql/storage/store.c
Branch: Jul2021
Log Message:

Remove message suggesting disk might be full: it usually isn't.
And anyway, the real reason is probably already logged.


diffs (127 lines):

diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -1123,7 +1123,7 @@ BBPinit(void)
                if (BBPrecover_subdir() != GDK_SUCCEED) {
                        GDKfree(bbpdirstr);
                        GDKfree(backupbbpdirstr);
-                       TRC_CRITICAL(GDK, "cannot properly recover_subdir 
process %s. Please check whether your disk is full or write-protected", SUBDIR);
+                       TRC_CRITICAL(GDK, "cannot properly recover_subdir 
process %s.", SUBDIR);
                        MT_lock_unset(&GDKtmLock);
                        return GDK_FAIL;
                }
@@ -1161,6 +1161,7 @@ BBPinit(void)
                                TRC_DEBUG(IO_, "reverting to dir saved in 
BBP.bak.\n");
 
                        if ((fp = GDKfilelocate(0, "BBP", "r", "dir")) == NULL) 
{
+                               GDKsyserror("cannot open BBP.dir");
                                GDKfree(bbpdirstr);
                                GDKfree(backupbbpdirstr);
                                MT_lock_unset(&GDKtmLock);
@@ -1209,7 +1210,7 @@ BBPinit(void)
                gdk_return rc = BBPprepare(false);
                MT_lock_unset(&GDKtmLock);
                if (rc != GDK_SUCCEED) {
-                       TRC_CRITICAL(GDK, "cannot properly prepare process %s. 
Please check whether your disk is full or write-protected", BAKDIR);
+                       TRC_CRITICAL(GDK, "cannot properly prepare process 
%s.", BAKDIR);
                        return rc;
                }
        }
@@ -1260,7 +1261,7 @@ BBPinit(void)
 
   bailout:
        /* now it is time for real panic */
-       TRC_CRITICAL(GDK, "could not write %s%cBBP.dir. Please check whether 
your disk is full or write-protected", BATDIR, DIR_SEP);
+       TRC_CRITICAL(GDK, "could not write %s%cBBP.dir.", BATDIR, DIR_SEP);
        return GDK_FAIL;
 }
 
@@ -2917,10 +2918,11 @@ BBPprepare(bool subcommit)
        str bakdirpath, subdirpath;
        gdk_return ret = GDK_SUCCEED;
 
-       if(!(bakdirpath = GDKfilepath(0, NULL, BAKDIR, NULL)))
-               return GDK_FAIL;
-       if(!(subdirpath = GDKfilepath(0, NULL, SUBDIR, NULL))) {
+       bakdirpath = GDKfilepath(0, NULL, BAKDIR, NULL);
+       subdirpath = GDKfilepath(0, NULL, SUBDIR, NULL);
+       if (bakdirpath == NULL || subdirpath == NULL) {
                GDKfree(bakdirpath);
+               GDKfree(subdirpath);
                return GDK_FAIL;
        }
 
@@ -3551,7 +3553,7 @@ BBPrecover(int farmid)
                TRC_DEBUG(IO_, "rmdir %s = %d\n", bakdirpath, (int) ret);
        }
        if (ret != GDK_SUCCEED)
-               GDKerror("recovery failed. Please check whether your disk is 
full or write-protected.\n");
+               GDKerror("recovery failed.\n");
 
        TRC_DEBUG(IO_, "end\n");
        GDKfree(bakdirpath);
@@ -3607,7 +3609,7 @@ BBPrecover_subdir(void)
        TRC_DEBUG(IO_, "end = %d\n", (int) ret);
 
        if (ret != GDK_SUCCEED)
-               GDKerror("recovery failed. Please check whether your disk is 
full or write-protected.\n");
+               GDKerror("recovery failed.\n");
        return ret;
 }
 
diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -308,6 +308,7 @@ GDKunlink(int farmid, const char *dir, c
                GDKfree(path);
                return GDK_SUCCEED;
        }
+       GDKerror("no name specified");
        return GDK_FAIL;
 }
 
diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c
--- a/monetdb5/modules/mal/tablet.c
+++ b/monetdb5/modules/mal/tablet.c
@@ -927,7 +927,7 @@ SQLworker_column(READERtask *task, int c
        MT_lock_set(&mal_copyLock);
        if (!fmt[col].skip && BATcapacity(fmt[col].c) < BATcount(fmt[col].c) + 
task->next) {
                if (BATextend(fmt[col].c, BATgrows(fmt[col].c) + task->limit) 
!= GDK_SUCCEED) {
-                       tablet_error(task, lng_nil, col, "Failed to extend the 
BAT, perhaps disk full\n", "SQLworker_column");
+                       tablet_error(task, lng_nil, col, "Failed to extend the 
BAT\n", "SQLworker_column");
                        MT_lock_unset(&mal_copyLock);
                        return -1;
                }
diff --git a/sql/server/sql_mvc.c b/sql/server/sql_mvc.c
--- a/sql/server/sql_mvc.c
+++ b/sql/server/sql_mvc.c
@@ -548,7 +548,7 @@ mvc_commit(mvc *m, int chain, const char
        if (tr->parent) {
                while (tr->parent != NULL && ok == SQL_OK) {
                        if ((ok = sql_trans_commit(tr)) == SQL_ERR)
-                               GDKfatal("%s transaction commit failed (perhaps 
your disk is full?) exiting (kernel error: %s)", operation, GDKerrbuf);
+                               GDKfatal("%s transaction commit failed; exiting 
(kernel error: %s)", operation, GDKerrbuf);
                        tr = sql_trans_destroy(tr);
                }
                while (tr->parent != NULL)
@@ -569,7 +569,7 @@ mvc_commit(mvc *m, int chain, const char
        }
 
        if ((ok = sql_trans_commit(tr)) == SQL_ERR)
-               GDKfatal("%s transaction commit failed (perhaps your disk is 
full?) exiting (kernel error: %s)", operation, GDKerrbuf);
+               GDKfatal("%s transaction commit failed; exiting (kernel error: 
%s)", operation, GDKerrbuf);
 
        (void)sql_trans_end(m->session, ok);
        if (chain && sql_trans_begin(m->session) < 0)
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -2303,7 +2303,7 @@ store_manager(sqlstore *store)
 
                if (res != LOG_OK) {
                        MT_lock_unset(&store->flush);
-                       GDKfatal("write-ahead logging failure, disk full?");
+                       GDKfatal("write-ahead logging failure");
                }
 
                if (GDKexiting())
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to