Skip to content

Commit

Permalink
Merge "Extra logs are added to the lua scripts at the debug level Whe…
Browse files Browse the repository at this point in the history
…n lua script returns an error, we print the error string while asserting" into R2.22.x
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Mar 17, 2016
2 parents bccdfc6 + 38b2722 commit 7891bc8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/analytics/OpServerProxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <tbb/mutex.h>
#include <boost/bind.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/assert.hpp>
#include "base/util.h"
#include "base/logging.h"
#include "base/parse_object.h"
Expand Down Expand Up @@ -362,7 +363,7 @@ class OpServerProxy::OpServerImpl {
// If redis returns error for async request, then perhaps it
// is busy executing a script and it has reached the maximum
// execution time limit.
assert(reply->type != REDIS_REPLY_ERROR);
BOOST_ASSERT_MSG(reply->type != REDIS_REPLY_ERROR, reply->str);

if (rpi) {
rpi->ProcessCallback(reply);
Expand Down
1 change: 1 addition & 0 deletions src/analytics/flushuves.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ redis.log(redis.LOG_NOTICE,"WARNING: Flushing Redis UVE DB")
local db = tonumber(ARGV[1])
redis.call('select',db)
redis.call('flushdb')
redis.log(redis.LOG_DEBUG,"WARNING: Flushing Redis UVE DB done")
1 change: 1 addition & 0 deletions src/analytics/seqnum.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ for k,v in pairs(typ) do
end
end
redis.call('sadd', "NGENERATORS", ARGV[1]..":"..ARGV[2]..":"..ARGV[3]..":"..ARGV[4])
redis.log(redis.LOG_DEBUG,"GetSeq for "..ARGV[1]..":"..ARGV[2]..":"..ARGV[3]..":"..ARGV[4].." done")
return res
4 changes: 4 additions & 0 deletions src/analytics/uveupdate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ local _table = KEYS[3]
local _uves = KEYS[4]
local _values = KEYS[5]

redis.log(redis.LOG_DEBUG,"UVEUpdate for "..sm.." key "..key.." type:attr "..typ..":"..attr)

redis.call('select',db)
local ism = redis.call('sismember', 'NGENERATORS', sm)
if ism == 0 then
Expand All @@ -35,4 +37,6 @@ redis.call('sadd',_table,key..':'..sm..":"..typ)
redis.call('zadd',_uves,seq,key)
redis.call('hset',_values,attr,val)

redis.log(redis.LOG_DEBUG,"UVEUpdate for "..sm.." key "..key.." done")

return true

0 comments on commit 7891bc8

Please sign in to comment.