inmem_store.go
func (i *InmemStore) DeleteRange(min, max uint64) error {
	i.l.Lock()
	defer i.l.Unlock()
	for j := min; j <= max; j++ {
		delete(i.logs, j)
	}
	if min <= i.lowIndex {
		i.lowIndex = max + 1
	}
	if max >= i.highIndex {
		i.highIndex = min - 1
	}
	if i.lowIndex > i.highIndex {
		i.lowIndex = 0
		i.highIndex = 0
	}
	return nil
}
func (i *InmemStore) DeleteRange(min, max uint64) error {
	i.l.Lock()
	defer i.l.Unlock()
	for j := min; j <= max; j++ {
		delete(i.logs, j)
	}
	if min <= i.lowIndex {
		i.lowIndex = max + 1
	}
	if max >= i.highIndex {
		i.highIndex = min - 1
	}
	if i.lowIndex > i.highIndex {
		i.lowIndex = 0
		i.highIndex = 0
	}
	return nil
}
func ( i * InmemStore ) DeleteRange ( min , max uint64 ) error { i . l . Lock ( ) defer i . l . Unlock ( ) for j := min ; j <= max ; j ++ { delete ( i . logs , j ) } if min <= i . lowIndex { i . lowIndex = max + 1 } if max >= i . highIndex { i . highIndex = min - 1 } if i . lowIndex > i . highIndex { i . lowIndex = 0 i . highIndex = 0 } return nil }
// DeleteRange implements the LogStore interface.
DeleteRange implements the LogStore interface .