From aeae34505f5f306bbf4d9f3db19db8a26ac5e63d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 6 Nov 2014 01:15:22 +0000
Subject: When processing incoming attachments via HG, if a request for uuid
gathering or final asset import takes too long remove remaining requests from
same user to prevent hold up of other user's incoming attachments.
This improves upon the earlier naive simply queueing immplementation.
Threshold is 30 seconds. If this happens to a user they can relog and fetch will be reattempted.
---
OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/UuidGatherer.cs')
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index 9c4e4c0..2450cdb 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -655,7 +655,22 @@ namespace OpenSim.Region.Framework.Scenes
///
/// Is gathering complete?
///
- public bool GatheringComplete { get { return m_assetUuidsToInspect.Count <= 0; } }
+ public bool Complete { get { return m_assetUuidsToInspect.Count <= 0; } }
+
+ ///
+ /// Gets the next UUID to inspect.
+ ///
+ /// If there is no next UUID then returns null
+ public UUID? NextUuidToInspect
+ {
+ get
+ {
+ if (Complete)
+ return null;
+ else
+ return m_assetUuidsToInspect.Peek();
+ }
+ }
protected IAssetService m_assetService;
@@ -693,7 +708,7 @@ namespace OpenSim.Region.Framework.Scenes
/// false if gathering is already complete, true otherwise
public bool GatherNext()
{
- if (GatheringComplete)
+ if (Complete)
return false;
GetAssetUuids(m_assetUuidsToInspect.Dequeue());
@@ -707,7 +722,7 @@ namespace OpenSim.Region.Framework.Scenes
/// false if gathering is already complete, true otherwise
public bool GatherAll()
{
- if (GatheringComplete)
+ if (Complete)
return false;
while (GatherNext());
--
cgit v1.1