flotsam file touch before expire: gatherer.GatherAll already touchs and tries to fecth all assets. This is nasty to use anyway.. avoid it
							parent
							
								
									7c0b3387dd
								
							
						
					
					
						commit
						6a4564869b
					
				|  | @ -892,38 +892,6 @@ namespace OpenSim.Region.CoreModules.Asset | |||
|                     gatherer.AddForInspection(e); | ||||
|                     gatherer.GatherAll(); | ||||
| 
 | ||||
|                     if(!m_timerRunning && !storeUncached) | ||||
|                         return; | ||||
| 
 | ||||
|                     foreach (UUID assetID in gatherer.GatheredUuids.Keys) | ||||
|                     { | ||||
|                         if (!assetsFound.ContainsKey(assetID)) | ||||
|                         { | ||||
|                             string filename = GetFileName(assetID.ToString()); | ||||
| 
 | ||||
|                             if (File.Exists(filename)) | ||||
|                             { | ||||
|                                 UpdateFileLastAccessTime(filename); | ||||
|                                 assetsFound[assetID] = true; | ||||
|                             } | ||||
|                             else if (storeUncached) | ||||
|                             { | ||||
|                                 AssetBase cachedAsset = m_AssetService.Get(assetID.ToString()); | ||||
|                                 if (cachedAsset == null && gatherer.GatheredUuids[assetID] != (sbyte)AssetType.Unknown) | ||||
|                                     assetsFound[assetID] = false; | ||||
|                                 else | ||||
|                                     assetsFound[assetID] = true; | ||||
|                             } | ||||
|                         } | ||||
|                         else if (!assetsFound[assetID]) | ||||
|                         { | ||||
|                             m_log.DebugFormat( | ||||
|                                 "[FLOTSAM ASSET CACHE]: Could not find asset {0}, type {1} referenced by object {2} at {3} in scene {4} when pre-caching all scene assets", | ||||
|                                 assetID, gatherer.GatheredUuids[assetID], e.Name, e.AbsolutePosition, s.Name); | ||||
|                         } | ||||
|                     } | ||||
| 
 | ||||
|                     gatherer.GatheredUuids.Clear(); | ||||
|                     if(!m_timerRunning && !storeUncached) | ||||
|                         return; | ||||
| 
 | ||||
|  | @ -932,9 +900,20 @@ namespace OpenSim.Region.CoreModules.Asset | |||
|                 }); | ||||
|                 if(!m_timerRunning && !storeUncached) | ||||
|                     break; | ||||
|                 gatherer.GatherAll(); | ||||
|             } | ||||
| 
 | ||||
|             return assetsFound.Count; | ||||
|             gatherer.GatherAll(); | ||||
|             if(gatherer.FailedUUIDs.Count > 0) | ||||
|                 m_log.WarnFormat("[FLOTSAM ASSET CACHE] expire files IDs not found as asset:{0}", gatherer.FailedUUIDs.Count); | ||||
| 
 | ||||
|             int count = gatherer.GatheredUuids.Count; | ||||
|             gatherer.GatheredUuids.Clear(); | ||||
|             gatherer.FailedUUIDs.Clear(); | ||||
|             gatherer.UncertainAssetsUUIDs.Clear(); | ||||
| 
 | ||||
|             GC.Collect(); | ||||
|             return count; | ||||
|         } | ||||
| 
 | ||||
|         /// <summary> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 UbitUmarov
						UbitUmarov