210
shardContext historyi.ShardContext,
211
task tasks.Task,
213
>
shardID := shardContext.GetShardID()
214
>
taskClock := vclock.NewVectorClock(
215
>
shardContext.GetClusterMetadata().GetClusterID(),
216
>
shardContext.GetShardID(),
217
>
task.GetTaskID(),
218
>
)
219
>
currentClock := shardContext.CurrentVectorClock()
220
>
result, err := vclock.Compare(taskClock, currentClock)
221
>
if err != nil {
222
return err
223
}
225
shardContext.UnloadForOwnershipLost()
226
return &persistence.ShardOwnershipLostError{