#640 WatchUnsub Behaviour

Hareesh Reddy G.M Tue 25 Sep

Hi,

Need some clarifications regarding watchUnsub operation behaviour and validations.

  1. If request has invalid watchId, error response is sent saying "Unknown watchId".
  2. If request has valid watchId and

    a) If request has both close marker tag in meta and id's in request cols then error response is sent like "Either close in meta or id's in cols expected".

    b) If request has neither close marker tag nor id's in cols, then error response is sent like "Neither close in meta nor id's in cols found".

    c) If request has invalid id's in request cols, those id's are ignored.

Note : No watch will be closed in scenario 2.a and 2.b (While sending error response to haystack client, no operation is performed).

Please let me know whether the above assumptions are correct or not.

Brian Frank Tue 25 Sep

I think your write-up is correct, but let me re-phrase it:

  1. If watchId not valid, then return error grid to indicate watchId is no longer valid
  2. If meta.has("close") then shutdown the watch
  3. Otherwise process each row and remove that individual id from the watch (if no valid rows, then this is essentially a no-op). However you should treat this a lease renewal since the client has successfully "pinged" you

Login or Signup to reply.