Cache assets even in cases where the upload fails. That helps in asset upload debugging because the asset can be examined

0.9.1.0-post-fixes
Melanie 2019-09-04 11:01:27 +01:00
parent bfc1756fe3
commit 3d019323e8
1 changed files with 8 additions and 8 deletions

View File

@ -539,11 +539,11 @@ namespace OpenSim.Services.Connectors
// SynchronousRestObjectRequester returns somethins that is not an empty string // SynchronousRestObjectRequester returns somethins that is not an empty string
asset.ID = newID; asset.ID = newID;
if (m_Cache != null)
m_Cache.Cache(asset);
} }
} }
if (m_Cache != null)
m_Cache.Cache(asset);
return asset.ID; return asset.ID;
} }
@ -573,8 +573,8 @@ namespace OpenSim.Services.Connectors
if (newID == null || newID == String.Empty || newID == stringUUIDZero) if (newID == null || newID == String.Empty || newID == stringUUIDZero)
{ {
if(nextRetryLevel >= MAXSENDRETRIESLEN) if(nextRetryLevel >= MAXSENDRETRIESLEN)
m_log.WarnFormat("[Assets] Upload giveup after several retries id: {0} type {1}", m_log.WarnFormat("[Assets] Giving up on uploading after {2} retries id: {0} type {1}",
asset.ID.ToString(), asset.Type.ToString()); asset.ID.ToString(), asset.Type.ToString(), MAXSENDRETRIESLEN);
else else
{ {
lock(m_sendRetries) lock(m_sendRetries)
@ -596,11 +596,11 @@ namespace OpenSim.Services.Connectors
if (newID != asset.ID) if (newID != asset.ID)
{ {
asset.ID = newID; asset.ID = newID;
if (m_Cache != null)
m_Cache.Cache(asset);
} }
} }
if (m_Cache != null)
m_Cache.Cache(asset);
} }
public bool UpdateContent(string id, byte[] data) public bool UpdateContent(string id, byte[] data)