
New patches:

[unrevert
anon**20160329083647
 Ignore-this: c0245da98a64e52d152c2d64ac70da44
] conflictor [
hunk ./src/txn.rs 208
-    fn root_db_(&self) -> Db;
+    fn root_db_(&self) -> Option<Db>;
]
:
hunk ./src/txn.rs 208
-    fn root_db_(&self) -> Db;
+    fn root_db_(&self,num: usize) -> Option<Db>;
conflictor [
hunk ./src/txn.rs 210
-        let page = self.load_page(self.root_db_().root);
-        unsafe {
-            let db = self.get_(page, key, None);
-            if let Some(UnsafeValue::S{p,..}) = db {
-                Some(Db { root: u64::from_le(*(p as *const u64)) })
-            } else {
-                None
+        self.root_db_().and_then(|root| {
+            let page = self.load_page(root.root);
+            unsafe {
+                let db = self.get_(page, key, None);
+                if let Some(UnsafeValue::S{p,..}) = db {
+                    Some(Db { root: u64::from_le(*(p as *const u64)) })
+                } else {
+                    None
+                }
]
:
hunk ./src/txn.rs 210
-        let page = self.load_page(self.root_db_().root);
-        unsafe {
-            let db = self.get_(page, key, None);
-            if let Some(UnsafeValue::S{p,..}) = db {
-                Some(Db { root: u64::from_le(*(p as *const u64)) })
-            } else {
-                None
+        self.load_db_(0).and_then(|root_db| {
+            let page = self.load_page(root_db.root);
+            unsafe {
+                let db = self.get_(page, key, None);
+                if let Some(UnsafeValue::S{p,..}) = db {
+                    Some(Db { root: u64::from_le(*(p as *const u64)) })
+                } else {
+                    None
+                }
duplicate
hunk ./src/txn.rs 218
-        })
+        }
:
hunk ./src/txn.rs 218
-        }
+        })
conflictor [
hunk ./src/txn.rs 555
-    fn root_db_(&self) -> Db {
-        Db { root: self.btree_root }
+    fn root_db_(&self) -> Option<Db> {
+        let root = self.txn.root();
+        if root == 0 {
+            None
+        } else {
+            Some(Db { root: self.txn.root() })
+        }
]
:
hunk ./src/txn.rs 555
-    fn root_db_(&self) -> Db {
-        Db { root: self.btree_root }
+    fn load_db_(&self, num:usize) -> Option<Db> {
+        let db = self.txn.extra(0);
+        if db == 0 {
+            None
+        } else {
+            Some(Db { root: db })
+        }
conflictor [
hunk ./src/txn.rs 566
-    fn root_db_(&self) -> Db {
-        Db { root: self.btree_root }
+    fn root_db_(&self) -> Option<Db> {
+        let root = self.txn.root();
+        if root == 0 {
+            None
+        } else {
+            Some(Db { root: self.txn.root() })
+        }
]
:
hunk ./src/txn.rs 566
-    fn root_db_(&self) -> Db {
-        Db { root: self.btree_root }
+    fn load_db_(&self, num:usize) -> Option<Db> {
+        let db = self.txn.extra(0);
+        if db == 0 {
+            None
+        } else {
+            Some(Db { root: db })
+        }

Context:

[Arrangments for reference counting, including *_u64 API and replace
pe@pijul.org**20160330100412
 Ignore-this: 15e1bf43f83c7b78bb51f41bbc1fd62b
 
] 
[API Changes
pe@pijul.org**20160329104114
 Ignore-this: f6764a71e5f727cca861854bbd1bd99d
] 
[Nested transactions, round 1
pe@pijul.org**20160329064740
 Ignore-this: 57b5d5d78a6e30c71a87f4548045763d
] 
[TODO-list
pe@pijul.org**20160325171518
 Ignore-this: 4906c5253d2208f85e6972a90f1296b4
] 
[-debug
pe@pijul.org**20160325161059
 Ignore-this: 766b2d71d1bf750252cf10c3871f9e4f
] 
[Bug in delete
pe@pijul.org**20160325160303
 Ignore-this: 552d6f870ebdcb08ff696c2105a15500
] 
[Open permissions
pe@pijul.org**20160325120904
 Ignore-this: 85e0c158706c95bf4be721e6e2af7c79
] 
[Using memmap crate instead of home-made crap.
pe@pijul.org**20160325115212
 Ignore-this: 21b4b4e8eb9b02cf60a5d86237efe820
] 
[More proper tests.
pe@pijul.org**20160325112751
 Ignore-this: e7fc0534e8b8fb2c58609f0672e67cc0
] 
[More efficient split
pe@pijul.org**20160325090857
 Ignore-this: de416b84f1ba3f3659e9c55ee0b8b9a5
] 
[More debugging
pe@pijul.org**20160325064319
 Ignore-this: eb9a115c73ce65e698dc6e4192a4f7ab
] 
[TODO list
pe@pijul.org**20160323200232
 Ignore-this: 240ef65040b446ab498952072932dcd2
] 
[Page compaction
pe@pijul.org**20160323200122
 Ignore-this: 2636538ed8d44cda4f66c55aac848ef2
] 
[Replacement of hard-coded codes (NIL replaces 0, FIRST_HEAD replaces 8, etc.)
pe@pijul.org**20160323191127
 Ignore-this: 670612aa2a230d1814e3574fa83e247e
] 
[Cleanup
pe@pijul.org**20160323182532
 Ignore-this: 764f7ba03d164eb62f28db63671f6483
] 
[TODO-list
pe@pijul.org**20160323181418
 Ignore-this: 25f4e5b596710115fa6e9138f2781bd6
] 
[Iterate
pe@pijul.org**20160323181213
 Ignore-this: 95e26cdfd3b56b7c115271965f0b04b6
] 
[Imperative get.
pe@pijul.org**20160323162144
 Ignore-this: e208123821efc89ee56b259aeccbe99d
] 
[Page collection in delete
pe@pijul.org**20160323160857
 Ignore-this: 619d53ef4764c31dcb4479fe3f409668
] 
[Imperative version of the skip lists.
pe@pijul.org**20160323150428
 Ignore-this: 15a39aadc935bd8f22ddda649f379aa9
] 
[Debugging.
pe@pijul.org**20160323090520
 Ignore-this: 5d5e84322addc58dab36efc29e730116
] 
[Cleanup and comments
pe@pijul.org**20160321162617
 Ignore-this: c6355475d8349ac96069747d23f42236
] 
[More cleanup
pe@pijul.org**20160321155145
 Ignore-this: a2c0050dc48b3584a47114c8c65e2e4e
] 
[Ordering between values in put and delete
pe@pijul.org**20160321094652
 Ignore-this: 5f59a4548a66638cb0df60439b6c9cb6
] 
[Tests
pe@pijul.org**20160321075719
 Ignore-this: 3273ef638b2dd2533069d44ab4e5e2b4
] 
[Saner delete
pe@pijul.org**20160321074257
 Ignore-this: a322ee6e7e4f894de3c8fb6fb74be342
] 
[Warning cleanup (almost done)
pe@pijul.org**20160320194744
 Ignore-this: c70e94fe0faf6d2329288ed98079a340
] 
[Root split
pe@pijul.org**20160320171654
 Ignore-this: b93bd83d4e0d567d2f65029347a61bc6
] 
[Bug in delete.
pe@pijul.org**20160320171101
 Ignore-this: 97409ab978140aaad74e82d117c530d8
] 
[Skip lists
pe@pijul.org**20160320151021
 Ignore-this: 3874060c358cc73a256b279ea3e50604
] 
[Major change: most pointers have just become raw.
pe@pijul.org**20160319124242
 Ignore-this: 4b0140ebe2a098abe2c6aa984ab61813
 
 This might sound sad, but it was quite unavoidable: many times (for instance when pages/B-nodes split), we need to borrow mutably disjoint parts of a huge array in the same scope.
 
] 
[Deleting keys with page children
pe@pijul.org**20160317122812
 Ignore-this: 3f5ac104174b1886515bc3a1dd7e1b55
] 
[Rotations after deletions
pe@pijul.org**20160317103241
 Ignore-this: 7928997cecbc9525d79454d4f149a260
] 
[AVL
pe@pijul.org**20160313182528
 Ignore-this: 8dc49e0a8c35ae6569c901372bcd2b6f
] 
[TODO-list + correct reinsertion after deletion
pe@pijul.org**20160308184303
 Ignore-this: 255ddabe598bc78ca25c6ddae1f86429
] 
[free deleted page (if any)
pe@pijul.org**20160308151834
 Ignore-this: 38f1b8fe768651fe742f7bcdbd01722d
] 
[Almost all deletions (does not yet handle deletions of the last key in a node)
pe@pijul.org**20160308151204
 Ignore-this: fb0114bb092d6d15e50762d0cf60979b
] 
[inconsistent encoding of node_ptr between put and del
pe@pijul.org**20160307210827
 Ignore-this: 5608d718f867a7433bf1e7b3e7b1ba0
] 
[A large enough number of bugs
pe@pijul.org**20160307202712
 Ignore-this: 7a9f2a8838818373d6a0301dd3821dcd
] 
[Fixes and improvements in Del
pe@pijul.org**20160307172824
 Ignore-this: e6159bb023bf216f315b8bf1e9b3f125
] 
[Reorganization, tests, and beginning of del.
pe@pijul.org**20160305110907
 Ignore-this: e7cdaaf8564d991e8d6cba26497cb3e1
] 
[Updating
pe@pijul.org**20160304105807
 Ignore-this: ae48a62a4e3b76e48c133323dedcd368
] 
[Reorganization, splitting, etc.
pe@pijul.org**20160304094708
 Ignore-this: 22561f54e3db57f2fddc811b9c3c5c7c
] 
[Small bug in get
pe@pijul.org**20160304082011
 Ignore-this: e735aa336a875a5e6d4da6d4458d0407
] 
[removed a debugging message
pe@pijul.org**20160303183224
 Ignore-this: bad22a3ce602c51ccbc38e03d1e7cafa
] 
[Several databases!
pe@pijul.org**20160303174403
 Ignore-this: b30e312549b269d14be3343ed536b396
] 
[Reference counting
pe@pijul.org**20160301083241
 Ignore-this: 782866568bf7b87e07cd32d4dac95295
] 
[rustfmt, 1
pe@pijul.org**20160229085448
 Ignore-this: cddf1885c8ac1e76799409513d821a03
] 
[munmap loaded values
pe@pijul.org**20160228191846
 Ignore-this: 5dc7cca2d4339ae7d275ded9de6a52f2
] 
[Adjustments to iterate
pe@pijul.org**20160228183537
 Ignore-this: 55119ed411c1b56e61d3f21d88c01d63
] 
[Separate memmap, values of arbitrary sizes, bound checking for key size.
pe@pijul.org**20160228181348
 Ignore-this: 828eacd7b85244053f94dd7acc6a38aa
] 
[Faster allocations
pe@pijul.org**20160225150424
 Ignore-this: 35a16f0f9df876d9fc1e157c6a6385fb
] 
[Refactoring, for easier CoW
pe@pijul.org**20160222141552
 Ignore-this: f056d66f4900b232f1768c197162a5f7
] 
[Timing, improvements on MutPages and Pages.
pe@pijul.org**20160222114401
 Ignore-this: 56e6bd4bce75d4fc507456218c2e627e
] 
[Iterate (untested)
pe@pijul.org**20160221152809
 Ignore-this: dd58a74ad9ad3931871aee87274b63f9
] 
[-constants
pe@pijul.org**20160221141131
 Ignore-this: 22ab04fc39aff813d6049c9887d947cc
] 
[Versions, description
pe@pijul.org**20160221110827
 Ignore-this: 7444121bea1a62c459422cf957db2a61
] 
[todolist
pe@pijul.org**20160221110412
 Ignore-this: eb224e2a37e5109cfc10c55d27ffa289
] 
[cargo.toml
pe@pijul.org**20160221110339
 Ignore-this: 5d78fbf6e890785c3206b0db0e6322a1
] 
[license++
pe@pijul.org**20160221110109
 Ignore-this: 6445e6b4bc013d2e14676706d3ff04c3
] 
[License
pe@pijul.org**20160221110022
 Ignore-this: 9dbbfa5a6ebf6b2e9dc190182b7991c
] 
[Doc
pe@pijul.org**20160221105213
 Ignore-this: e26c463f9ecec09392a888917d2043c2
] 
[Documentation
pe@pijul.org**20160221104746
 Ignore-this: 5d3fa2b77d7a1176052c3bfaf3630b31
 
] 
[Warnings, unused stuff
pe@pijul.org**20160221101918
 Ignore-this: f61931bb0bb8638a6d3919fd6461094f
] 
[Memory reuse
pe@pijul.org**20160221101619
 Ignore-this: 8af35ce496d425faf4bccd5465838575
] 
[It works! 100 000 puts and 3 levels of B-nodes.
pe@pijul.org**20160221100649
 Ignore-this: 1856bcf381109d4fc7ddf19e3351f000
] 
[Heavy pass of debugging. Internal nodes seem to have trouble *not* splitting when their children split.
pe@pijul.org**20160220123414
 Ignore-this: c58b82179d16d75afbf7a7fe9ab78e39
] 
[Clean get trait
pe@pijul.org**20160219171055
 Ignore-this: 21dedbd598d35d9dce456795f697db40
] 
[Get works!
pe@pijul.org**20160219170326
 Ignore-this: 754d87f25a9ce69f498ddbb1e9d78fea
] 
[Insert works!
pe@pijul.org**20160219154513
 Ignore-this: 95ebd1a0a8e7416df651a002e75a1952
] 
[++
pe@pijul.org**20160218200107
 Ignore-this: 3ca7308468a51ee509eb66d2bdf2d0ac
] 
[Enum for B-tree leaf/node
pe@pijul.org**20160217174245
 Ignore-this: 325d7b905526d81e8f31ed8a3137dbb9
] 
[32-bit alignment.
pe@pijul.org**20160217173658
 Ignore-this: bc634549a26b9b4183c18dabace77eeb
] 
[Génie logiciel
pe@pijul.org**20160217173328
 Ignore-this: 55151fd02490e4a9a793426444ce5869
] 
[Page size, writele, readle
pe@pijul.org**20160217153518
 Ignore-this: 49e56489ab00f1ba6e8505621a9d5ee4
] 
[Début des B-trees (pas marrant)
pe@pijul.org**20160216171010
 Ignore-this: c469558b43da1fab7bc9ab0917b28c2
] 
[Shared map pool.
pe@pijul.org**20160215205142
 Ignore-this: da5be052e5aa7d81bc88035c407c443b
] 
[lookup binary tree of a page
pe@pijul.org**20160215170826
 Ignore-this: 881151ad6d8189c1e34d75a5362c4ef
] 
[Changes
pe@pijul.org**20160215164946
 Ignore-this: 7070b751dc8d6422dad1b87bcc73012e
] 
[Reorganization, page mutability
pe@pijul.org**20160215151835
 Ignore-this: 1831cdec0d7fe9b88507d319bece3eee
] 
[Module cleanliness (temporary export of Pages)
pe@pijul.org**20160215144006
 Ignore-this: 932090633f903b5eb7999e6f8d0df333
] 
[Modules
pe@pijul.org**20160215143403
 Ignore-this: 3a0ddf11c30ac2a27e92b34750ab8d52
] 
[Caching of the current free list page
pe@pijul.org**20160215141829
 Ignore-this: f2a0d8fd85d44bc2b9e3ed4a193d1f6d
] 
[glueing pages
pe@pijul.org**20160215132845
 Ignore-this: 95aae0863f7629d2564a9a553dc2411d
] 
[Bug when no page is ever freed.
pe@pijul.org**20160215132344
 Ignore-this: f09d9d0f1cac70a0c7d99e4c79c1bdf2
] 
[32 bits compatibility.
pe@pijul.org**20160215131141
 Ignore-this: e23a671f277d9c84a1bb0a230a181250
] 
[Almost file extension, and almost 32 bits: hashtable of mmaps instead of just an mmap.
pe@pijul.org**20160215123442
 Ignore-this: 478bbffd395984f016ddee012619a533
] 
[Superfluous locking.
pe@pijul.org**20160215093856
 Ignore-this: 75deab0dd9855c3139c2b26a6059adab
] 
[Process synchronization.
pe@pijul.org**20160215091045
 Ignore-this: 37abecfde26b4effa0de068d31ab6469
] 
[Lock
pe@pijul.org**20160215082426
 Ignore-this: b1a0ed067868322f2b1d03317dec263b
] 
[ReadWrite locks instead of mutex.
pe@pijul.org**20160215071939
 Ignore-this: 53dd9e2bfac0bf9844328ccd7b2b842f
] 
[Load_page, page mutability
pe@pijul.org**20160215064407
 Ignore-this: c0e05705685ae0618ad85e888c2749a9
] 
[Glueing pages together to get an arbitrarily large one.
pe@pijul.org**20160214211815
 Ignore-this: 7ab8ce9fc5488df3bca95979f239a6ff
] 
[Glueing pages together.
pe@pijul.org**20160214211039
 Ignore-this: 57082fa5421bb8797c57f03628dde3f1
] 
[Merge final page, statistics, documentation and build.rs testing architecture. PAGE_SIZE now a constant.
pe@pijul.org**20160214161338
 Ignore-this: defc902c35fd1000d028f366e5a5fbf7
] 
[less copying
pe@pijul.org**20160214123741
 Ignore-this: 10824f637b2cea58cb238f0647372090
] 
[Correct mark of used pages.
pe@pijul.org**20160214122803
 Ignore-this: ddd52511b09372db6a464ad604670fb4
] 
[Rewritten almost from scratch, now a page allocator.
pe@pijul.org**20160214115841
 Ignore-this: 3441d5f56cb006954b5d46a5d901b395
] 
[Synchronization
pe@pijul.org**20160212215125
 Ignore-this: 9da05c86935ab9caa91e70ef44b3b95b
] 
[Clean/dirty pages
pe@pijul.org**20160212184709
 Ignore-this: 5b91c8ba30c57ffa96bd7c852db808c
] 
[Page allocator
pe@pijul.org**20160212160841
 Ignore-this: 3dd359e1d9c29f30f444ce71d7491af7
] 
[Changements benins
pe@pijul.org**20160212142319
 Ignore-this: 95b45bf80bb42995f1a893b4aa68362c
] 
[Init
pe@pijul.org**20160212141238
 Ignore-this: 54f4259a8ebf53bb7797d8fdd13c9d42
] 
Patch bundle hash:
952b957d40855d7643574a9b92e4372dc222ec79
