aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-05-15 20:20:55 +0000
committerJustin Clarke Casey2009-05-15 20:20:55 +0000
commitc11e047410fdabb5c53ebdb7cec637a177254aeb (patch)
treea59b59b3840090dc7ab4d774fd2acae8a65f3dab /OpenSim/Region
parent* Change default sqlite asset db back to Asset.db instead of AssetStorage.db (diff)
downloadopensim-SC_OLD-c11e047410fdabb5c53ebdb7cec637a177254aeb.zip
opensim-SC_OLD-c11e047410fdabb5c53ebdb7cec637a177254aeb.tar.gz
opensim-SC_OLD-c11e047410fdabb5c53ebdb7cec637a177254aeb.tar.bz2
opensim-SC_OLD-c11e047410fdabb5c53ebdb7cec637a177254aeb.tar.xz
* Resolve bug where save oar would never complete if any assets were missing
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs18
3 files changed, 11 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
index b167ce2..20eb393 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -85,9 +85,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
85 m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid); 85 m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid);
86 } 86 }
87 87
88 m_log.InfoFormat( 88// m_log.InfoFormat(
89 "[ARCHIVER]: Received {0} of {1} assets requested", 89// "[ARCHIVER]: Received {0} of {1} assets requested",
90 assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count); 90// assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count);
91 91
92 m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); 92 m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time.");
93 93
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
index 0c01cae..e2b08ae 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
@@ -144,8 +144,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
144 144
145 m_assetsWritten++; 145 m_assetsWritten++;
146 146
147 //m_log.DebugFormat("[ARCHIVER]: Added asset {0}", m_assetsWritten);
148
147 if (m_assetsWritten % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL == 0) 149 if (m_assetsWritten % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL == 0)
148 m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", m_assetsWritten); 150 m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", m_assetsWritten);
149 } 151 }
150 } 152 }
151} 153}
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
index 6cd52ab..97f9b18 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
@@ -97,15 +97,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
97 97
98 foreach (UUID uuid in m_uuids) 98 foreach (UUID uuid in m_uuids)
99 { 99 {
100 m_assetCache.Get(uuid.ToString(), this, AssetReceived); 100 m_assetCache.Get(uuid.ToString(), this, AssetRequestCallback);
101 }
102 }
103
104 protected void AssetReceived(string id, object sender, AssetBase asset)
105 {
106 if (asset != null)
107 {
108 AssetRequestCallback(asset.FullID, asset);
109 } 101 }
110 } 102 }
111 103
@@ -114,24 +106,24 @@ namespace OpenSim.Region.CoreModules.World.Archiver
114 /// </summary> 106 /// </summary>
115 /// <param name="assetID"></param> 107 /// <param name="assetID"></param>
116 /// <param name="asset"></param> 108 /// <param name="asset"></param>
117 public void AssetRequestCallback(UUID assetID, AssetBase asset) 109 public void AssetRequestCallback(string id, object sender, AssetBase asset)
118 { 110 {
119 //m_log.DebugFormat("[ARCHIVER]: Received callback for asset {0}", assetID); 111 //m_log.DebugFormat("[ARCHIVER]: Received callback for asset {0}", assetID);
120 112
121 if (asset != null) 113 if (asset != null)
122 { 114 {
123 m_foundAssetUuids.Add(assetID); 115 m_foundAssetUuids.Add(asset.FullID);
124 m_assetsArchiver.WriteAsset(asset); 116 m_assetsArchiver.WriteAsset(asset);
125 } 117 }
126 else 118 else
127 { 119 {
128 m_notFoundAssetUuids.Add(assetID); 120 m_notFoundAssetUuids.Add(new UUID(id));
129 } 121 }
130 122
131 if (m_foundAssetUuids.Count + m_notFoundAssetUuids.Count == m_repliesRequired) 123 if (m_foundAssetUuids.Count + m_notFoundAssetUuids.Count == m_repliesRequired)
132 { 124 {
133 m_log.DebugFormat( 125 m_log.DebugFormat(
134 "[ARCHIVER]: Successfully received {0} assets and notification of {1} missing assets", 126 "[ARCHIVER]: Successfully added {0} assets ({1} assets missing)",
135 m_foundAssetUuids.Count, m_notFoundAssetUuids.Count); 127 m_foundAssetUuids.Count, m_notFoundAssetUuids.Count);
136 128
137 // We want to stop using the asset cache thread asap 129 // We want to stop using the asset cache thread asap