mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 09:56:28 +00:00 
			
		
		
		
	fix index deletion bug
This commit is contained in:
		@@ -442,13 +442,16 @@ impl UpdateStore {
 | 
			
		||||
 | 
			
		||||
        while let Some(Ok(((_, uuid, _), pending))) = pendings.next() {
 | 
			
		||||
            if uuid == index_uuid {
 | 
			
		||||
                unsafe {
 | 
			
		||||
                    pendings.del_current()?;
 | 
			
		||||
                }
 | 
			
		||||
                let mut pending = pending.decode()?;
 | 
			
		||||
                if let Some(update_uuid) = pending.content.take() {
 | 
			
		||||
                    uuids_to_remove.push(update_uuid);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // Invariant check: we can only delete the current entry when we don't hold
 | 
			
		||||
                // references to it anymore. This must be done after we have retrieved its content.
 | 
			
		||||
                unsafe {
 | 
			
		||||
                    pendings.del_current()?;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user