VOL-1247 : Modified change tuple to include previous and latest data
VOL-1214 : Fixed logs to use the proper mechanism
- Added missing license
- Moved one change tuple statement which would not include proper info
Change-Id: I5a02f6fe92c8b193642294d62f4413ac6edc0c62
diff --git a/db/model/root.go b/db/model/root.go
index a6c62c6..27e4ec4 100644
--- a/db/model/root.go
+++ b/db/model/root.go
@@ -18,7 +18,6 @@
import (
"encoding/hex"
"encoding/json"
- "fmt"
"github.com/google/uuid"
"github.com/opencord/voltha-go/common/log"
"reflect"
@@ -115,7 +114,6 @@
r.NotificationCallbacks = append(r.NotificationCallbacks, CallbackTuple{callback, args})
}
-
func (r *root) Update(path string, data interface{}, strict bool, txid string, makeBranch MakeBranchFunction) Revision {
var result Revision
@@ -246,7 +244,7 @@
start := time.Now()
if err := json.Unmarshal(blob.Value.([]byte), &data); err != nil {
- fmt.Errorf("problem to unmarshal blob - error:%s\n", err.Error())
+ log.Errorf("problem to unmarshal blob - error:%s\n", err.Error())
}
stop := time.Now()
GetProfiling().AddToInMemoryModelTime(stop.Sub(start).Seconds())