mirror of
				https://github.com/isar/libmdbx.git
				synced 2025-10-31 03:29:01 +08:00 
			
		
		
		
	mdbx: backport - ITS#8323 Fix nested commit.
Must remove our spilled pages from parent's dirty list Change-Id: Ic37bcea4975801e48832968ea38050064a581d21
This commit is contained in:
		
							
								
								
									
										1
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								CHANGES
									
									
									
									
									
								
							| @@ -20,6 +20,7 @@ LMDB 0.9.17 Release Engineering | ||||
| 	Fix ITS#8312 loose pages in nested txn | ||||
| 	Fix ITS#8313 mdb_rebalance dummy cursor | ||||
| 	Fix ITS#8315 dirty_room in nested txn | ||||
| 	Fix ITS#8323 dirty_list in nested txn | ||||
| 	Fix ITS#8316 page_merge cursor tracking | ||||
| 	Fix ITS#8319 mdb_load error messages | ||||
| 	Fix ITS#8320 mdb_load plaintext input | ||||
|   | ||||
							
								
								
									
										19
									
								
								mdb.c
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								mdb.c
									
									
									
									
									
								
							| @@ -3761,6 +3761,25 @@ mdb_txn_commit(MDB_txn *txn) | ||||
| 			pspill[0] = y; | ||||
| 		} | ||||
|  | ||||
| 		/* Remove anything in our spill list from parent's dirty list */ | ||||
| 		if (txn->mt_spill_pgs && txn->mt_spill_pgs[0]) { | ||||
| 			for (i=1; i<=txn->mt_spill_pgs[0]; i++) { | ||||
| 				MDB_ID pn = txn->mt_spill_pgs[i]; | ||||
| 				if (pn & 1) | ||||
| 					continue;	/* deleted spillpg */ | ||||
| 				pn >>= 1; | ||||
| 				y = mdb_mid2l_search(dst, pn); | ||||
| 				if (y <= dst[0].mid && dst[y].mid == pn) { | ||||
| 					free(dst[y].mptr); | ||||
| 					while (y < dst[0].mid) { | ||||
| 						dst[y] = dst[y+1]; | ||||
| 						y++; | ||||
| 					} | ||||
| 					dst[0].mid--; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		/* Find len = length of merging our dirty list with parent's */ | ||||
| 		x = dst[0].mid; | ||||
| 		dst[0].mid = 0;		/* simplify loops */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user