celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] Oipo commented on pull request #285: Add API call for retrieving db index
Date Thu, 24 Sep 2020 07:19:02 GMT

Oipo commented on pull request #285:
URL: https://github.com/apache/celix/pull/285#issuecomment-698164298


   I believe the X-Etcd-Index value is tied to a key. 
   
   If we take a look at the [etcd API](https://etcd.io/docs/v2/api/) description:
   
   > node.createdIndex: an index is a unique, monotonically-incrementing integer created
for each change to etcd. This specific index reflects the point in the etcd state member at
which a given key was created. You may notice that in this example the index is 2 even though
it is the first request you sent to the server. This is because there are internal commands
that also change the state behind the scenes, like adding and syncing servers.
   
   It's probably best to do an `etcdlib_get()` before an `etcdlib_watch()`. If the return
value is ETCDLIB_RC_ERROR, you can assume it is 0.


----------------------------------------------------------------
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.

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



Mime
View raw message