anchor.diff:          with :? ValidationException as e -> fail <| e.Data0
       
       /// Close the index    
  -    let close (writer : T) = writer.ShardWriters |> Array.iter (fun s -> ShardWriter.close (s))
  +    let close (writer : T) = 
  +        writer.Token.Cancel()
  +        writer.ShardWriters |> Array.iter (fun s -> ShardWriter.close (s))
       
       let memoryManager = new Microsoft.IO.RecyclableMemoryStreamManager()
       
  
positive.code:               ShardWriters = shardWriters
                Caches = caches
                State = IndexState.Online
                Settings = settings }
          indexWriter |> replayTransactionLogs
          indexWriter
  
negative.code:     let getDocumentCount (s : T) = 
          s.ShardWriters |> Array.fold (fun count shard -> ShardWriter.getDocumentCount (shard) + count) 0
      
      /// <summary>
      /// Creates a async timer which can be used to execute a function at specified
      /// period of time. This is used to schedule all recurring indexing tasks
      /// </summary>
      /// <param name="delay">Delay to be applied</param>
      /// <param name="work">Method to perform the work</param>
      /// <param name="indexWriter">Index on which the job is to be scheduled</param>
      let scheduleIndexJob delay (work : T -> unit) indexWriter = 
          let rec loop time (cts : CancellationTokenSource) = 
              async { 
                  do! Async.Sleep(time)
                  if (cts.IsCancellationRequested) then cts.Dispose()
                  else 
                      try 
                          work indexWriter
                      with e -> cts.Dispose()
                  return! loop delay cts
              }
          loop delay indexWriter.Token
  
      /// Replay all the uncommitted transactions from the logs
      let replayTransactionLogs (indexWriter : T) = 
          let replayShardTransaction (shardWriter : ShardWriter.T) = 
  