func (r *ShardItem) Contains(key []byte) bool {
	start, end := r.Shard.Start, r.Shard.End
	return bytes.Compare(key, start) >= 0 && (len(end) == 0 || bytes.Compare(key, end) < 0)
}
Contains returns the item contains the key
package util
import (
	"bytes"
	"sync"
	"github.com/google/btree"
	"github.com/matrixorigin/matrixcube/pb/meta"
)
const (
	defaultBTreeDegree = 64
)
var (
	emptyShard meta.Shard
	itemPool   sync.Pool
)
func acquireItem() *ShardItem {
	v := itemPool.Get()
	if v == nil {
		return &ShardItem{}
	}
	return v.(*ShardItem)
}
func releaseItem(item *ShardItem) {
	itemPool.Put(item)
}
type ShardItem struct {
	Shard meta.Shard
}
type ShardTree struct {
	sync.RWMutex
	tree *btree.BTree
}
func NewShardTree() *ShardTree {
	return &ShardTree{
		tree: btree.New(defaultBTreeDegree),
	}
}
func (r *ShardItem) Less(other btree.Item) bool {
	left := r.Shard.Start
	right := other.(*ShardItem).Shard.Start
	return bytes.Compare(left, right) > 0
}