aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-11-06 01:15:22 +0000
committerJustin Clark-Casey (justincc)2014-11-25 23:23:11 +0000
commitaeae34505f5f306bbf4d9f3db19db8a26ac5e63d (patch)
tree1a6afdaeb024dc9ffa60cf98e9f53afc1f992c96 /OpenSim/Region/Framework/Scenes/UuidGatherer.cs
parentIntroduce an IteratingUuidGatherer where each fetch from the asset service (i... (diff)
downloadopensim-SC_OLD-aeae34505f5f306bbf4d9f3db19db8a26ac5e63d.zip
opensim-SC_OLD-aeae34505f5f306bbf4d9f3db19db8a26ac5e63d.tar.gz
opensim-SC_OLD-aeae34505f5f306bbf4d9f3db19db8a26ac5e63d.tar.bz2
opensim-SC_OLD-aeae34505f5f306bbf4d9f3db19db8a26ac5e63d.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/UuidGatherer.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs21
1 files changed, 18 insertions, 3 deletions
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
655 /// <summary> 655 /// <summary>
656 /// Is gathering complete? 656 /// Is gathering complete?
657 /// </summary> 657 /// </summary>
658 public bool GatheringComplete { get { return m_assetUuidsToInspect.Count <= 0; } } 658 public bool Complete { get { return m_assetUuidsToInspect.Count <= 0; } }
659
660 /// <summary>
661 /// Gets the next UUID to inspect.
662 /// </summary>
663 /// <value>If there is no next UUID then returns null</value>
664 public UUID? NextUuidToInspect
665 {
666 get
667 {
668 if (Complete)
669 return null;
670 else
671 return m_assetUuidsToInspect.Peek();
672 }
673 }
659 674
660 protected IAssetService m_assetService; 675 protected IAssetService m_assetService;
661 676
@@ -693,7 +708,7 @@ namespace OpenSim.Region.Framework.Scenes
693 /// <returns>false if gathering is already complete, true otherwise</returns> 708 /// <returns>false if gathering is already complete, true otherwise</returns>
694 public bool GatherNext() 709 public bool GatherNext()
695 { 710 {
696 if (GatheringComplete) 711 if (Complete)
697 return false; 712 return false;
698 713
699 GetAssetUuids(m_assetUuidsToInspect.Dequeue()); 714 GetAssetUuids(m_assetUuidsToInspect.Dequeue());
@@ -707,7 +722,7 @@ namespace OpenSim.Region.Framework.Scenes
707 /// <returns>false if gathering is already complete, true otherwise</returns> 722 /// <returns>false if gathering is already complete, true otherwise</returns>
708 public bool GatherAll() 723 public bool GatherAll()
709 { 724 {
710 if (GatheringComplete) 725 if (Complete)
711 return false; 726 return false;
712 727
713 while (GatherNext()); 728 while (GatherNext());