You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "bseto (via GitHub)" <gi...@apache.org> on 2025/03/19 13:03:05 UTC

Re: [PR] fix consul engine bug when calling Set and List [kvrocks-controller]

bseto commented on code in PR #283:
URL: https://github.com/apache/kvrocks-controller/pull/283#discussion_r2003265397


##########
store/engine/consul/consul.go:
##########
@@ -209,7 +214,7 @@ func (c *Consul) List(ctx context.Context, prefix string) ([]engine.Entry, error
 		if string(kv.Key) == prefix {
 			continue
 		}
-		key := strings.TrimLeft(string(kv.Key[prefixLen+1]), "/")
+		key := strings.TrimLeft(string(kv.Key[prefixLen+1:]), "/")

Review Comment:
   Bug 2 fix. I noticed that this was missing the `:` which I could find in the [etcd](https://github.com/apache/kvrocks-controller/blob/unstable/store/engine/etcd/etcd.go#L205) and other implementations



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org