aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-08-09 00:52:51 +0100
committerJustin Clark-Casey (justincc)2014-08-09 00:52:51 +0100
commit8738445eb70321e728c845b5095817b67aaca35b (patch)
tree1fcdf9e7432a4c5fb9e9777a1a1760862b198ea5 /OpenSim/Region
parentChange RootRotationUpdateTolerance from 0.01 to 0.1 in code as well. (diff)
downloadopensim-SC_OLD-8738445eb70321e728c845b5095817b67aaca35b.zip
opensim-SC_OLD-8738445eb70321e728c845b5095817b67aaca35b.tar.gz
opensim-SC_OLD-8738445eb70321e728c845b5095817b67aaca35b.tar.bz2
opensim-SC_OLD-8738445eb70321e728c845b5095817b67aaca35b.tar.xz
Move the inventory request lock introduced in git master a58152bd to HGInventoryBroker to preserve that behaviour there but allow 2 simultaneous inv requests (chiefly WebFetch) rather than 1
This lock serialized all requests and made the inventory throttling in WebFetch redundant. By moving this lock, two simultaneous requests may now take place which may help with http://opensimulator.org/mantis/view.php?id=7054
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs63
1 files changed, 43 insertions, 20 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
index 9179dc7..e13ee42 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
@@ -62,6 +62,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
62 62
63 private InventoryCache m_Cache = new InventoryCache(); 63 private InventoryCache m_Cache = new InventoryCache();
64 64
65 /// <summary>
66 /// Used to serialize inventory requests.
67 /// </summary>
68 private object m_Lock = new object();
69
65 protected IUserManagement m_UserManagement; 70 protected IUserManagement m_UserManagement;
66 protected IUserManagement UserManagementModule 71 protected IUserManagement UserManagementModule
67 { 72 {
@@ -301,7 +306,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
301 306
302 public bool CreateUserInventory(UUID userID) 307 public bool CreateUserInventory(UUID userID)
303 { 308 {
304 return m_LocalGridInventoryService.CreateUserInventory(userID); 309 lock (m_Lock)
310 return m_LocalGridInventoryService.CreateUserInventory(userID);
305 } 311 }
306 312
307 public List<InventoryFolderBase> GetInventorySkeleton(UUID userID) 313 public List<InventoryFolderBase> GetInventorySkeleton(UUID userID)
@@ -309,7 +315,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
309 string invURL = GetInventoryServiceURL(userID); 315 string invURL = GetInventoryServiceURL(userID);
310 316
311 if (invURL == null) // not there, forward to local inventory connector to resolve 317 if (invURL == null) // not there, forward to local inventory connector to resolve
312 return m_LocalGridInventoryService.GetInventorySkeleton(userID); 318 lock (m_Lock)
319 return m_LocalGridInventoryService.GetInventorySkeleton(userID);
313 320
314 IInventoryService connector = GetConnector(invURL); 321 IInventoryService connector = GetConnector(invURL);
315 322
@@ -326,7 +333,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
326 string invURL = GetInventoryServiceURL(userID); 333 string invURL = GetInventoryServiceURL(userID);
327 334
328 if (invURL == null) // not there, forward to local inventory connector to resolve 335 if (invURL == null) // not there, forward to local inventory connector to resolve
329 return m_LocalGridInventoryService.GetRootFolder(userID); 336 lock (m_Lock)
337 return m_LocalGridInventoryService.GetRootFolder(userID);
330 338
331 IInventoryService connector = GetConnector(invURL); 339 IInventoryService connector = GetConnector(invURL);
332 340
@@ -347,7 +355,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
347 string invURL = GetInventoryServiceURL(userID); 355 string invURL = GetInventoryServiceURL(userID);
348 356
349 if (invURL == null) // not there, forward to local inventory connector to resolve 357 if (invURL == null) // not there, forward to local inventory connector to resolve
350 return m_LocalGridInventoryService.GetFolderForType(userID, type); 358 lock (m_Lock)
359 return m_LocalGridInventoryService.GetFolderForType(userID, type);
351 360
352 IInventoryService connector = GetConnector(invURL); 361 IInventoryService connector = GetConnector(invURL);
353 362
@@ -365,7 +374,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
365 string invURL = GetInventoryServiceURL(userID); 374 string invURL = GetInventoryServiceURL(userID);
366 375
367 if (invURL == null) // not there, forward to local inventory connector to resolve 376 if (invURL == null) // not there, forward to local inventory connector to resolve
368 return m_LocalGridInventoryService.GetFolderContent(userID, folderID); 377 lock (m_Lock)
378 return m_LocalGridInventoryService.GetFolderContent(userID, folderID);
369 379
370 InventoryCollection c = m_Cache.GetFolderContent(userID, folderID); 380 InventoryCollection c = m_Cache.GetFolderContent(userID, folderID);
371 if (c != null) 381 if (c != null)
@@ -375,8 +385,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
375 } 385 }
376 386
377 IInventoryService connector = GetConnector(invURL); 387 IInventoryService connector = GetConnector(invURL);
378 return connector.GetFolderContent(userID, folderID);
379 388
389 return connector.GetFolderContent(userID, folderID);
380 } 390 }
381 391
382 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) 392 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
@@ -386,7 +396,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
386 string invURL = GetInventoryServiceURL(userID); 396 string invURL = GetInventoryServiceURL(userID);
387 397
388 if (invURL == null) // not there, forward to local inventory connector to resolve 398 if (invURL == null) // not there, forward to local inventory connector to resolve
389 return m_LocalGridInventoryService.GetFolderItems(userID, folderID); 399 lock (m_Lock)
400 return m_LocalGridInventoryService.GetFolderItems(userID, folderID);
390 401
391 List<InventoryItemBase> items = m_Cache.GetFolderItems(userID, folderID); 402 List<InventoryItemBase> items = m_Cache.GetFolderItems(userID, folderID);
392 if (items != null) 403 if (items != null)
@@ -396,8 +407,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
396 } 407 }
397 408
398 IInventoryService connector = GetConnector(invURL); 409 IInventoryService connector = GetConnector(invURL);
399 return connector.GetFolderItems(userID, folderID);
400 410
411 return connector.GetFolderItems(userID, folderID);
401 } 412 }
402 413
403 public bool AddFolder(InventoryFolderBase folder) 414 public bool AddFolder(InventoryFolderBase folder)
@@ -410,7 +421,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
410 string invURL = GetInventoryServiceURL(folder.Owner); 421 string invURL = GetInventoryServiceURL(folder.Owner);
411 422
412 if (invURL == null) // not there, forward to local inventory connector to resolve 423 if (invURL == null) // not there, forward to local inventory connector to resolve
413 return m_LocalGridInventoryService.AddFolder(folder); 424 lock (m_Lock)
425 return m_LocalGridInventoryService.AddFolder(folder);
414 426
415 IInventoryService connector = GetConnector(invURL); 427 IInventoryService connector = GetConnector(invURL);
416 428
@@ -427,7 +439,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
427 string invURL = GetInventoryServiceURL(folder.Owner); 439 string invURL = GetInventoryServiceURL(folder.Owner);
428 440
429 if (invURL == null) // not there, forward to local inventory connector to resolve 441 if (invURL == null) // not there, forward to local inventory connector to resolve
430 return m_LocalGridInventoryService.UpdateFolder(folder); 442 lock (m_Lock)
443 return m_LocalGridInventoryService.UpdateFolder(folder);
431 444
432 IInventoryService connector = GetConnector(invURL); 445 IInventoryService connector = GetConnector(invURL);
433 446
@@ -446,7 +459,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
446 string invURL = GetInventoryServiceURL(ownerID); 459 string invURL = GetInventoryServiceURL(ownerID);
447 460
448 if (invURL == null) // not there, forward to local inventory connector to resolve 461 if (invURL == null) // not there, forward to local inventory connector to resolve
449 return m_LocalGridInventoryService.DeleteFolders(ownerID, folderIDs); 462 lock (m_Lock)
463 return m_LocalGridInventoryService.DeleteFolders(ownerID, folderIDs);
450 464
451 IInventoryService connector = GetConnector(invURL); 465 IInventoryService connector = GetConnector(invURL);
452 466
@@ -463,7 +477,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
463 string invURL = GetInventoryServiceURL(folder.Owner); 477 string invURL = GetInventoryServiceURL(folder.Owner);
464 478
465 if (invURL == null) // not there, forward to local inventory connector to resolve 479 if (invURL == null) // not there, forward to local inventory connector to resolve
466 return m_LocalGridInventoryService.MoveFolder(folder); 480 lock (m_Lock)
481 return m_LocalGridInventoryService.MoveFolder(folder);
467 482
468 IInventoryService connector = GetConnector(invURL); 483 IInventoryService connector = GetConnector(invURL);
469 484
@@ -480,7 +495,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
480 string invURL = GetInventoryServiceURL(folder.Owner); 495 string invURL = GetInventoryServiceURL(folder.Owner);
481 496
482 if (invURL == null) // not there, forward to local inventory connector to resolve 497 if (invURL == null) // not there, forward to local inventory connector to resolve
483 return m_LocalGridInventoryService.PurgeFolder(folder); 498 lock (m_Lock)
499 return m_LocalGridInventoryService.PurgeFolder(folder);
484 500
485 IInventoryService connector = GetConnector(invURL); 501 IInventoryService connector = GetConnector(invURL);
486 502
@@ -497,7 +513,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
497 string invURL = GetInventoryServiceURL(item.Owner); 513 string invURL = GetInventoryServiceURL(item.Owner);
498 514
499 if (invURL == null) // not there, forward to local inventory connector to resolve 515 if (invURL == null) // not there, forward to local inventory connector to resolve
500 return m_LocalGridInventoryService.AddItem(item); 516 lock (m_Lock)
517 return m_LocalGridInventoryService.AddItem(item);
501 518
502 IInventoryService connector = GetConnector(invURL); 519 IInventoryService connector = GetConnector(invURL);
503 520
@@ -514,7 +531,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
514 string invURL = GetInventoryServiceURL(item.Owner); 531 string invURL = GetInventoryServiceURL(item.Owner);
515 532
516 if (invURL == null) // not there, forward to local inventory connector to resolve 533 if (invURL == null) // not there, forward to local inventory connector to resolve
517 return m_LocalGridInventoryService.UpdateItem(item); 534 lock (m_Lock)
535 return m_LocalGridInventoryService.UpdateItem(item);
518 536
519 IInventoryService connector = GetConnector(invURL); 537 IInventoryService connector = GetConnector(invURL);
520 538
@@ -533,7 +551,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
533 string invURL = GetInventoryServiceURL(ownerID); 551 string invURL = GetInventoryServiceURL(ownerID);
534 552
535 if (invURL == null) // not there, forward to local inventory connector to resolve 553 if (invURL == null) // not there, forward to local inventory connector to resolve
536 return m_LocalGridInventoryService.MoveItems(ownerID, items); 554 lock (m_Lock)
555 return m_LocalGridInventoryService.MoveItems(ownerID, items);
537 556
538 IInventoryService connector = GetConnector(invURL); 557 IInventoryService connector = GetConnector(invURL);
539 558
@@ -552,7 +571,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
552 string invURL = GetInventoryServiceURL(ownerID); 571 string invURL = GetInventoryServiceURL(ownerID);
553 572
554 if (invURL == null) // not there, forward to local inventory connector to resolve 573 if (invURL == null) // not there, forward to local inventory connector to resolve
555 return m_LocalGridInventoryService.DeleteItems(ownerID, itemIDs); 574 lock (m_Lock)
575 return m_LocalGridInventoryService.DeleteItems(ownerID, itemIDs);
556 576
557 IInventoryService connector = GetConnector(invURL); 577 IInventoryService connector = GetConnector(invURL);
558 578
@@ -568,7 +588,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
568 string invURL = GetInventoryServiceURL(item.Owner); 588 string invURL = GetInventoryServiceURL(item.Owner);
569 589
570 if (invURL == null) // not there, forward to local inventory connector to resolve 590 if (invURL == null) // not there, forward to local inventory connector to resolve
571 return m_LocalGridInventoryService.GetItem(item); 591 lock (m_Lock)
592 return m_LocalGridInventoryService.GetItem(item);
572 593
573 IInventoryService connector = GetConnector(invURL); 594 IInventoryService connector = GetConnector(invURL);
574 595
@@ -585,7 +606,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
585 string invURL = GetInventoryServiceURL(folder.Owner); 606 string invURL = GetInventoryServiceURL(folder.Owner);
586 607
587 if (invURL == null) // not there, forward to local inventory connector to resolve 608 if (invURL == null) // not there, forward to local inventory connector to resolve
588 return m_LocalGridInventoryService.GetFolder(folder); 609 lock (m_Lock)
610 return m_LocalGridInventoryService.GetFolder(folder);
589 611
590 IInventoryService connector = GetConnector(invURL); 612 IInventoryService connector = GetConnector(invURL);
591 613
@@ -609,7 +631,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
609 string invURL = GetInventoryServiceURL(userID); 631 string invURL = GetInventoryServiceURL(userID);
610 632
611 if (invURL == null) // not there, forward to local inventory connector to resolve 633 if (invURL == null) // not there, forward to local inventory connector to resolve
612 return m_LocalGridInventoryService.GetAssetPermissions(userID, assetID); 634 lock (m_Lock)
635 return m_LocalGridInventoryService.GetAssetPermissions(userID, assetID);
613 636
614 IInventoryService connector = GetConnector(invURL); 637 IInventoryService connector = GetConnector(invURL);
615 638