From dcd0bd1de7c59f69a104f704c46a3cf8f3d721ff Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 13 Sep 2011 00:22:11 -0400 Subject: [PATCH] TDB2 - Fixed a bug, or rather a side-effect of more efficient i/o. Now that a TDB2::GC call does not write out files until the final TDB2::commit, the GC has the effect of not modifying task IDs based on shuffling tasks between pending.data and completed.data until the next command. Fixed. --- src/TDB2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 66548b0a2..6bdbee161 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -1607,11 +1607,15 @@ int TDB2::gc () pending.clear (); pending._dirty = true; pending._loaded_tasks = true; + _id = 1; for (task = pending_tasks_after.begin (); task != pending_tasks_after.end (); ++task) + { + task->id = _id++; pending._tasks.push_back (*task); + } // Note: deliberately no commit. }