aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt5
-rw-r--r--guts/link.c6
-rw-r--r--pseudo_db.c16
3 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index d029328..b9d3193 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,8 @@
+2010-04-26:
+ * (seebs) many bug fixes and updates
+ * (seebs) allow deleting entries in pseudolog
+ * (seebs) correct race conditions and related bugs
+
2010-04-20:
* (seebs) add quick sanity-check option for pseudo
* (seebs) report on rows deleted
diff --git a/guts/link.c b/guts/link.c
index ef9e0c5..e528d53 100644
--- a/guts/link.c
+++ b/guts/link.c
@@ -15,7 +15,11 @@
* that there was no previous file with this name, so we
* shove it into the database.
*/
- real___xstat64(_STAT_VER, oldpath, &buf);
+ /* On linux, link(2) links to symlinks, not to the
+ * files they link to. This is contraPOSIX, but
+ * it's apparently useful.
+ */
+ real___lxstat64(_STAT_VER, oldpath, &buf);
/* a link should copy the existing database entry, if
* there is one. OP_LINK is also used to insert unseen
* files, though, so it can't be implicit.
diff --git a/pseudo_db.c b/pseudo_db.c
index 0af38eb..e4047fa 100644
--- a/pseudo_db.c
+++ b/pseudo_db.c
@@ -547,8 +547,17 @@ get_db(sqlite3 **db) {
}
sqlite3_free_table(results);
}
- /* cleanup database before getting started */
- sqlite3_exec(*db, "VACUUM;", NULL, NULL, &errmsg);
+ /* cleanup database before getting started
+ *
+ * On a large build, the logs database gets GIGANTIC... And
+ * we rarely-if-ever delete things from it. So instead of
+ * doing the vacuum operation on it at startup, which can impose
+ * a several-minute delay, we do it only on deletions.
+ *
+ */
+ if (db == &file_db) {
+ sqlite3_exec(*db, "VACUUM;", NULL, NULL, &errmsg);
+ }
return rc;
}
@@ -1089,6 +1098,9 @@ pdb_history(pseudo_query_t *traits, unsigned long fields, int unique, int do_del
int rc = sqlite3_step(select);
if (rc != SQLITE_DONE) {
dberr(log_db, "deletion failed");
+ } else {
+ pseudo_diag("Deleted records, vacuuming log database (may take a while).\n");
+ sqlite3_exec(log_db, "VACUUM;", NULL, NULL, NULL);
}
sqlite3_finalize(select);
return 0;