aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJohn Hurliman2010-09-07 14:41:13 -0700
committerJohn Hurliman2010-09-07 14:41:13 -0700
commit9be1c0ff448d4ea650ca921937905653b4017d61 (patch)
tree845b09cb064fb023993b559671ec22d4678d8c1b /OpenSim/Region
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-9be1c0ff448d4ea650ca921937905653b4017d61.zip
opensim-SC_OLD-9be1c0ff448d4ea650ca921937905653b4017d61.tar.gz
opensim-SC_OLD-9be1c0ff448d4ea650ca921937905653b4017d61.tar.bz2
opensim-SC_OLD-9be1c0ff448d4ea650ca921937905653b4017d61.tar.xz
* Cache null account responses in the SimianUserAccountServiceConnector to avoid repeated requests for missing avatar IDs
* Updated to OpenMetaverse r3442 to fix a timezone issue with ExpiringCache
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs6
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs4
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs4
6 files changed, 17 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 9cdc80b..0925222 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3529,9 +3529,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3529 3529
3530 private void ProcessEntityUpdates(int maxUpdates) 3530 private void ProcessEntityUpdates(int maxUpdates)
3531 { 3531 {
3532 Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>(); 3532 OpenMetaverse.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenMetaverse.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
3533 Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>(); 3533 OpenMetaverse.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenMetaverse.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
3534 Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>(); 3534 OpenMetaverse.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new OpenMetaverse.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
3535 3535
3536 if (maxUpdates <= 0) maxUpdates = Int32.MaxValue; 3536 if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
3537 int updatesThisCall = 0; 3537 int updatesThisCall = 0;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
index e43f7cf..194c064 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
@@ -140,13 +140,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
140 { 140 {
141 // Process all the pending adds 141 // Process all the pending adds
142 OutgoingPacket pendingAdd; 142 OutgoingPacket pendingAdd;
143 while (m_pendingAdds.Dequeue(out pendingAdd)) 143 while (m_pendingAdds.TryDequeue(out pendingAdd))
144 m_packets[pendingAdd.SequenceNumber] = pendingAdd; 144 m_packets[pendingAdd.SequenceNumber] = pendingAdd;
145 145
146 // Process all the pending removes, including updating statistics and round-trip times 146 // Process all the pending removes, including updating statistics and round-trip times
147 PendingAck pendingRemove; 147 PendingAck pendingRemove;
148 OutgoingPacket ackedPacket; 148 OutgoingPacket ackedPacket;
149 while (m_pendingRemoves.Dequeue(out pendingRemove)) 149 while (m_pendingRemoves.TryDequeue(out pendingRemove))
150 { 150 {
151 if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket)) 151 if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
152 { 152 {
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 9eaa758..5255d30 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -252,7 +252,7 @@ namespace Flotsam.RegionModules.AssetCache
252 } 252 }
253 else 253 else
254 { 254 {
255 m_MemoryCache.AddOrUpdate(key, asset, DateTime.MaxValue); 255 m_MemoryCache.AddOrUpdate(key, asset, Double.MaxValue);
256 } 256 }
257 } 257 }
258 } 258 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
index e1bc243..e7cfda1 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
@@ -36,6 +36,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
36{ 36{
37 public class UserAccountCache 37 public class UserAccountCache
38 { 38 {
39 private const double CACHE_EXPIRATION_SECONDS = 120.0;
40
39 private static readonly ILog m_log = 41 private static readonly ILog m_log =
40 LogManager.GetLogger( 42 LogManager.GetLogger(
41 MethodBase.GetCurrentMethod().DeclaringType); 43 MethodBase.GetCurrentMethod().DeclaringType);
@@ -51,9 +53,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
51 public void Cache(UUID userID, UserAccount account) 53 public void Cache(UUID userID, UserAccount account)
52 { 54 {
53 // Cache even null accounts 55 // Cache even null accounts
54 m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromMinutes(2.0d)); 56 m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS);
55 if (account != null) 57 if (account != null)
56 m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromMinutes(2.0d)); 58 m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS);
57 59
58 m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); 60 m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
59 } 61 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index 58698ee..0f08408 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -48,6 +48,7 @@ using OpenSim.Tests.Common.Setup;
48using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants; 48using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants;
49using TarArchiveReader = OpenSim.Framework.Serialization.TarArchiveReader; 49using TarArchiveReader = OpenSim.Framework.Serialization.TarArchiveReader;
50using TarArchiveWriter = OpenSim.Framework.Serialization.TarArchiveWriter; 50using TarArchiveWriter = OpenSim.Framework.Serialization.TarArchiveWriter;
51using RegionSettings = OpenSim.Framework.RegionSettings;
51 52
52namespace OpenSim.Region.CoreModules.World.Archiver.Tests 53namespace OpenSim.Region.CoreModules.World.Archiver.Tests
53{ 54{
@@ -135,7 +136,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
135 136
136 SceneObjectPart part2 = CreateSceneObjectPart2(); 137 SceneObjectPart part2 = CreateSceneObjectPart2();
137 138
138 AssetNotecard nc = new AssetNotecard("Hello World!"); 139 AssetNotecard nc = new AssetNotecard();
140 nc.BodyText = "Hello World!";
141 nc.Encode();
139 UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); 142 UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000");
140 UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); 143 UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000");
141 AssetBase ncAsset 144 AssetBase ncAsset
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
index da8199d..5e491c2 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
@@ -75,7 +75,9 @@ namespace OpenSim.Region.Framework.Tests
75 75
76 protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part) 76 protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part)
77 { 77 {
78 AssetNotecard nc = new AssetNotecard("Hello World!"); 78 AssetNotecard nc = new AssetNotecard();
79 nc.BodyText = "Hello World!";
80 nc.Encode();
79 UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); 81 UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000");
80 UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); 82 UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000");
81 AssetBase ncAsset 83 AssetBase ncAsset