public AzureIndexInput(AzureIndexInput cloneInput) { _fileMutex = SyncMutexManager.GrabMutex(cloneInput._azureDirectory, cloneInput._name); _fileMutex.WaitOne(); try { #if FULLDEBUG Debug.WriteLine(String.Format("Creating clone for {0}", cloneInput._name)); #endif _azureDirectory = cloneInput._azureDirectory; _blobContainer = cloneInput._blobContainer; _blob = cloneInput._blob; _indexInput = cloneInput._indexInput.Clone() as IndexInput; } catch (Exception) { // sometimes we get access denied on the 2nd stream...but not always. I haven't tracked it down yet // but this covers our tail until I do Debug.WriteLine(String.Format("Dagnabbit, falling back to memory clone for {0}", cloneInput._name)); } finally { _fileMutex.ReleaseMutex(); } }
public override System.Object Clone() { IndexInput clone = null; try { _fileMutex.WaitOne(); AzureIndexInput input = new AzureIndexInput(this); clone = (IndexInput)input; } catch (System.Exception err) { Debug.WriteLine(err.ToString()); } finally { _fileMutex.ReleaseMutex(); } Debug.Assert(clone != null); return(clone); }
public override System.Object Clone() { IndexInput clone = null; try { _fileMutex.WaitOne(); AzureIndexInput input = new AzureIndexInput(this); clone = (IndexInput)input; } catch (System.Exception err) { Debug.WriteLine(err.ToString()); } finally { _fileMutex.ReleaseMutex(); } Debug.Assert(clone != null); return clone; }