(metaStore common.MetaStore, diskStore diskstore.DiskStore)
| 74 | } |
| 75 | |
| 76 | func NewPeerDataNodeServer(metaStore common.MetaStore, diskStore diskstore.DiskStore) pb.PeerDataNodeServer { |
| 77 | return &PeerDataNodeServerImpl{ |
| 78 | metaStore: metaStore, |
| 79 | diskStore: diskStore, |
| 80 | sessions: make(map[int64]*sessionInfo), |
| 81 | tableShardSessions: make(map[tableShardPair][]int64), |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | // AcquireToken is to check if any bootstrap is running in the table/shard |
| 86 | // if no bootstrap session is running on the table/shard, it will increase the token count, and return true |
no outgoing calls