aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-20 20:36:06 +0000
committerJustin Clarke Casey2008-04-20 20:36:06 +0000
commit3d3eec436a42ced82b51ac11d03c2d98cc3d729a (patch)
treeeb973b021b0b15bcb0bb1f0cbce6b8567e72f05c /OpenSim
parent* Tweak inventory login failure message to point to the region owner as first... (diff)
downloadopensim-SC_OLD-3d3eec436a42ced82b51ac11d03c2d98cc3d729a.zip
opensim-SC_OLD-3d3eec436a42ced82b51ac11d03c2d98cc3d729a.tar.gz
opensim-SC_OLD-3d3eec436a42ced82b51ac11d03c2d98cc3d729a.tar.bz2
opensim-SC_OLD-3d3eec436a42ced82b51ac11d03c2d98cc3d729a.tar.xz
* Remove user profile from cache when they log out from a region.
* A much more significant fix is required to clean up the cache when a user moves out of a region, but really better handling of delayed inventory cache updates needs to be written first, and possibly better affinity to cut down agent inventory requests when the move is between two regions hosted on the same server.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs25
-rw-r--r--OpenSim/Framework/Communications/LoginResponse.cs2
-rw-r--r--OpenSim/Grid/InventoryServer/GridInventoryService.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
4 files changed, 28 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index a9e2780..9813756 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -86,7 +86,30 @@ namespace OpenSim.Framework.Communications.Cache
86 } 86 }
87 } 87 }
88 } 88 }
89 } 89 }
90
91 /// <summary>
92 /// Remove this user's profile cache.
93 /// </summary>
94 /// <param name="userID"></param>
95 /// <returns>true if the user was successfully removed, false otherwise</returns>
96 public bool RemoveUser(LLUUID userID)
97 {
98 lock (m_userProfiles)
99 {
100 if (m_userProfiles.ContainsKey(userID))
101 {
102 m_userProfiles.Remove(userID);
103 return true;
104 }
105 else
106 {
107 m_log.WarnFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userID);
108 }
109 }
110
111 return false;
112 }
90 113
91 /// <summary> 114 /// <summary>
92 /// Request the inventory data for the given user. This will occur asynchronously if running on a grid 115 /// Request the inventory data for the given user. This will occur asynchronously if running on a grid
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index 9636d16..1b88d10 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -247,7 +247,7 @@ namespace OpenSim.Framework.UserManagement
247 { 247 {
248 return GenerateFailureResponse( 248 return GenerateFailureResponse(
249 "key", 249 "key",
250 "The agent inventory service is not responding. Please notify your region operator.", 250 "The agent inventory service is not responding. Please notify your login region operator.",
251 "false"); 251 "false");
252 } 252 }
253 253
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index 8a45bad..f7c9828 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -110,7 +110,7 @@ namespace OpenSim.Grid.InventoryServer
110 public InventoryCollection GetUserInventory(Guid rawUserID) 110 public InventoryCollection GetUserInventory(Guid rawUserID)
111 { 111 {
112 // uncomment me to simulate an overloaded inventory server 112 // uncomment me to simulate an overloaded inventory server
113 //Thread.Sleep(40000); 113 //Thread.Sleep(25000);
114 114
115 LLUUID userID = new LLUUID(rawUserID); 115 LLUUID userID = new LLUUID(rawUserID);
116 116
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index c5ed958..a3f6948 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1696,6 +1696,8 @@ namespace OpenSim.Region.Environment.Scenes
1696 m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions); 1696 m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions);
1697 1697
1698 RemoveCapsHandler(agentID); 1698 RemoveCapsHandler(agentID);
1699
1700 CommsManager.UserProfileCacheService.RemoveUser(agentID);
1699 } 1701 }
1700 1702
1701 m_eventManager.TriggerClientClosed(agentID); 1703 m_eventManager.TriggerClientClosed(agentID);