Skip to content

Commit 3e19a43

Browse files
committed
minor etcdqdb log enhancement
1 parent f8dd505 commit 3e19a43

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

qdb/etcdqdb.go

+3-9
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,7 @@ func transferTxNodePath(key string) string {
109109
// TODO : unit tests
110110
func (q *EtcdQDB) CreateKeyRange(ctx context.Context, keyRange *KeyRange) error {
111111
spqrlog.Zero.Debug().
112-
Bytes("lower-bound", keyRange.LowerBound[0]).
113-
Str("shard-id", keyRange.ShardID).
114-
Str("distribution-id", keyRange.DistributionId).
115-
Str("key-range-id", keyRange.KeyRangeID).
112+
Interface("key-range", keyRange).
116113
Msg("etcdqdb: add key range")
117114

118115
rawKeyRange, err := json.Marshal(keyRange)
@@ -171,11 +168,8 @@ func (q *EtcdQDB) GetKeyRange(ctx context.Context, id string) (*KeyRange, error)
171168
// TODO : unit tests
172169
func (q *EtcdQDB) UpdateKeyRange(ctx context.Context, keyRange *KeyRange) error {
173170
spqrlog.Zero.Debug().
174-
Bytes("lower-bound", keyRange.LowerBound[0]).
175-
Str("shard-id", keyRange.ShardID).
176-
Str("distribution-id", keyRange.KeyRangeID).
177-
Str("key-range-id", keyRange.KeyRangeID).
178-
Msg("etcdqdb: add key range")
171+
Interface("key-range", keyRange).
172+
Msg("etcdqdb: update key range")
179173

180174
rawKeyRange, err := json.Marshal(keyRange)
181175
if err != nil {

0 commit comments

Comments
 (0)