From 86a6c3ff7701c8a1f2f3fe660d088b3fa610b314 Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Sat, 3 Mar 2007 01:46:44 +0000 Subject: [PATCH] Removed comment that warns about a solved problem --- src/lladd/operations/pageOperations.c | 31 --------------------------- 1 file changed, 31 deletions(-) diff --git a/src/lladd/operations/pageOperations.c b/src/lladd/operations/pageOperations.c index 7278eb1..a8ea2e8 100644 --- a/src/lladd/operations/pageOperations.c +++ b/src/lladd/operations/pageOperations.c @@ -60,37 +60,6 @@ compensated_function void pageOperationsInit() { } -/** @todo TpageAlloc / TpageDealloc + undo + page reuse is not multi-transaction / threadsafe. - - Example of the problem: - - T1 T2 - dealloc(100) - (a) list ptr 30 -> 100 - (b) p(100) nil -> 30 - alloc() -> 100 <- Can't allow this to happen! - list_ptr 100 -> 30 - alloc() -> 30 - list_ptr 30 -> 20 - abort(); - - // Really just needs to remove 100 from the linked list. Instead, - we use physical, value based locking. - - list ptr 20 <- 30 <- Oops! Page 30 is in use, and we lose the rest - of the freelist, starting at 20! - - The partial solution: dealloc() aquires a lock on the freelist until - commit / abort. If other transactions need to allocate when the - lock is held, then they simply do not reuse pages. Since locking is - not yet implemented, we require applications to manually serialize - transactions that call Talloc or Tdealloc - - A better solution: defer the addition of 100 to the freelist until - commit, and use a 'real' data structure, like a concurrent B-Tree. - -*/ - compensated_function int TpageDealloc(int xid, int pageid) { TregionDealloc(xid, pageid); // @todo inefficient hack! return 0;