go-zookeeper icon indicating copy to clipboard operation
go-zookeeper copied to clipboard

Fix: Exists() should always return false when an error happenning and FLW parsing enhancement

Open jasonjoo2010 opened this issue 4 years ago • 1 comments

This PR solved 2 small issues togethor:

  1. Newer zookeeper (tested with 3.6.x) outputs a little different in 4-letter-word response.
  2. Exists() acts different to ExistsW()

Description

FLW

Newer server will response different on latency element:

Latency min/avg/max: 0/0.9167/8

Which seems like some float numbers.

So I adjust the regex expression to pass it.

Exists()

Exists() will return true with an error except ErrNoNode:

error happened result error returned
nil true nil
ErrNoNode false nil
Any other ~true~(incorrect) error

In addition ExistsW() acts correctly.

jasonjoo2010 avatar Jun 04 '20 10:06 jasonjoo2010