mirror of
				https://github.com/taigrr/bitcask
				synced 2025-01-18 04:03:17 -08:00 
			
		
		
		
	Fixed missing error handling opening new Datafile(s) during Put() Fixes #4
This commit is contained in:
		
							parent
							
								
									67ab944db7
								
							
						
					
					
						commit
						e83608b903
					
				@ -132,6 +132,10 @@ func (b *Bitcask) put(key string, value []byte) (int64, error) {
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		df, err := NewDatafile(b.path, b.curr.id, true)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return -1, err
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		b.datafiles = append(b.datafiles, df)
 | 
			
		||||
 | 
			
		||||
		id := b.curr.id + 1
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user