aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2013-03-23 13:12:41 +0100
committerMelanie Thielker2013-03-23 13:12:41 +0100
commitaba66c71122a2ca9a3c2fb807b360e9fff8b9026 (patch)
tree4bfc62ed632d7c28adf03bb4f741ce6880f5b576 /OpenSim/Region
parent* Ignores VolumeDetect enabled prim in the camera raycast call. Note: The ... (diff)
downloadopensim-SC_OLD-aba66c71122a2ca9a3c2fb807b360e9fff8b9026.zip
opensim-SC_OLD-aba66c71122a2ca9a3c2fb807b360e9fff8b9026.tar.gz
opensim-SC_OLD-aba66c71122a2ca9a3c2fb807b360e9fff8b9026.tar.bz2
opensim-SC_OLD-aba66c71122a2ca9a3c2fb807b360e9fff8b9026.tar.xz
Make sharing errors not spew and let the cache retry the files
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index a0f1e8c..ec388f4 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -369,7 +369,7 @@ namespace OpenSim.Region.CoreModules.Asset
369 AssetBase asset = null; 369 AssetBase asset = null;
370 370
371 string filename = GetFileName(id); 371 string filename = GetFileName(id);
372 if (File.Exists(filename)) 372 while (File.Exists(filename))
373 { 373 {
374 FileStream stream = null; 374 FileStream stream = null;
375 try 375 try
@@ -380,6 +380,8 @@ namespace OpenSim.Region.CoreModules.Asset
380 asset = (AssetBase)bformatter.Deserialize(stream); 380 asset = (AssetBase)bformatter.Deserialize(stream);
381 381
382 m_DiskHits++; 382 m_DiskHits++;
383
384 break;
383 } 385 }
384 catch (System.Runtime.Serialization.SerializationException e) 386 catch (System.Runtime.Serialization.SerializationException e)
385 { 387 {
@@ -392,12 +394,24 @@ namespace OpenSim.Region.CoreModules.Asset
392 // {different version of AssetBase} -- we should attempt to 394 // {different version of AssetBase} -- we should attempt to
393 // delete it and re-cache 395 // delete it and re-cache
394 File.Delete(filename); 396 File.Delete(filename);
397
398 break;
399 }
400 catch (IOException e)
401 {
402 // This is a sharing violation: File exists but can't be opened because it's
403 // being written
404 Thread.Sleep(100);
405
406 continue;
395 } 407 }
396 catch (Exception e) 408 catch (Exception e)
397 { 409 {
398 m_log.ErrorFormat( 410 m_log.ErrorFormat(
399 "[FLOTSAM ASSET CACHE]: Failed to get file {0} for asset {1}. Exception {2} {3}", 411 "[FLOTSAM ASSET CACHE]: Failed to get file {0} for asset {1}. Exception {2} {3}",
400 filename, id, e.Message, e.StackTrace); 412 filename, id, e.Message, e.StackTrace);
413
414 break;
401 } 415 }
402 finally 416 finally
403 { 417 {