celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] unitink72 commented on pull request #285: Add API call for retrieving db index
Date Fri, 25 Sep 2020 13:30:06 GMT

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


   I had two factors that led me to wanting this available:
   1. When I wrote my db interface code, the first thing I did was setup a directory/key structure
then set a watch on the etcd directory containing all those keys.  Using the index from the
last get always resulted in the watch api being triggered on changes that were made in the
past.  There was an ugly work around that by writing a key that was outside that dir structure
then reading it again, but that was a hack.
   
   2. In the link you gave (etcd v2 api), there's a section down further titled "Watch From
Cleared Event Index".   It describes a case that could happen in my system - the modified
index of the key being over 1000 revisions old.  This would break my watch api calls.
   
   It may be possible to have multiple X-Etcd-Index values among a cluster, but I'm assuming
that they try to sycn them up asap.  That issue doesn't bother me for my system.
   
   If the code doesnt fit for your project, thats OK.  Just thought I'd offer it up as its
definitely useful for me.


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