aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Asset
diff options
context:
space:
mode:
authorMelanie2013-03-23 11:45:52 +0000
committerMelanie2013-03-23 11:45:52 +0000
commit8669586e185680172cb577da7f961fb22a437fcb (patch)
tree52cc9902b1684da747c281528083bedeeebf19cb /OpenSim/Region/CoreModules/Asset
parentMerge branch 'master' into careminster (diff)
parentMake sharing errors not spew and let the cache retry the files (diff)
downloadopensim-SC-8669586e185680172cb577da7f961fb22a437fcb.zip
opensim-SC-8669586e185680172cb577da7f961fb22a437fcb.tar.gz
opensim-SC-8669586e185680172cb577da7f961fb22a437fcb.tar.bz2
opensim-SC-8669586e185680172cb577da7f961fb22a437fcb.tar.xz
Merge branch 'avination' into careminster
Conflicts: OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset')
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 96e8f35..08e7cb7 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -369,8 +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 372 while (File.Exists(filename))
373 if (File.Exists(filename))
374 { 373 {
375 FileStream stream = null; 374 FileStream stream = null;
376 try 375 try
@@ -381,6 +380,8 @@ namespace OpenSim.Region.CoreModules.Asset
381 asset = (AssetBase)bformatter.Deserialize(stream); 380 asset = (AssetBase)bformatter.Deserialize(stream);
382 381
383 m_DiskHits++; 382 m_DiskHits++;
383
384 break;
384 } 385 }
385 catch (System.Runtime.Serialization.SerializationException e) 386 catch (System.Runtime.Serialization.SerializationException e)
386 { 387 {
@@ -393,12 +394,24 @@ namespace OpenSim.Region.CoreModules.Asset
393 // {different version of AssetBase} -- we should attempt to 394 // {different version of AssetBase} -- we should attempt to
394 // delete it and re-cache 395 // delete it and re-cache
395 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;
396 } 407 }
397 catch (Exception e) 408 catch (Exception e)
398 { 409 {
399 m_log.WarnFormat( 410 m_log.WarnFormat(
400 "[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}",
401 filename, id, e.Message, e.StackTrace); 412 filename, id, e.Message, e.StackTrace);
413
414 break;
402 } 415 }
403 finally 416 finally
404 { 417 {