From f362ada8bb1b339043d23423ce8bbb8365b25dcf Mon Sep 17 00:00:00 2001 From: alexhudson Date: Mon, 19 Jul 2010 14:24:29 +0000 Subject: [PATCH] Update object size earlier, since parsing/etc. depends on it being right. --- src/agents/store/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agents/store/command.c b/src/agents/store/command.c index 9516c07..a95dec8 100644 --- a/src/agents/store/command.c +++ b/src/agents/store/command.c @@ -2830,6 +2830,7 @@ StoreCommandREPLACE(StoreClient *client, StoreObject *object, int size, uint64_t // writing a range - new size must be maximum of old size and new end of range tmpsize = rend; } + object->size = tmpsize; // we gain the lock quite late - we have the new file, but haven't updated // anything yet. Potential waste of effort. @@ -2861,7 +2862,6 @@ StoreCommandREPLACE(StoreClient *client, StoreObject *object, int size, uint64_t } // update other metadata StoreObjectUpdateModifiedTime(object); - object->size = tmpsize; if (StoreObjectSave(client, object)) { ccode = ConnWriteStr(client->conn, MSG5005DBLIBERR);