Tao He
4f25a5c5de
Fixes bugs in ls/rmdir/watch for processing range end.
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2023-03-07 21:46:51 +08:00
Tao He
b12fc293b9
Fixes memory leak issue inside the watcher ( #197 )
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2023-03-05 23:08:10 +08:00
Tao He
9b5c5bd3c6
Fixes the deadlock in keep alive ( #191 )
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2023-02-14 21:20:12 +08:00
Tao He
10f3435c28
Enable keys() to list elements without fetching values from server ( #184 )
...
* Enable keys() to list elements without fetching values from server
* Add concurrency control and cancel to CI workflows
Signed-off-by: Tao He <sighingnow@gmail.com>
2023-01-10 15:00:34 +08:00
Tao He
9f09066b47
Fixes the timeout parameter and some improvements to find non-standard installed deps. ( #178 )
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-17 13:18:36 +08:00
Tao He
1fb5abac28
Implements the "etcdctl lease list" functionality ( #174 )
...
* Implements the "etcdctl lease list" functionalities.
* LeaseLeases requires etcd >= 3.3
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-13 00:04:18 +08:00
Tao He
ab255467d0
Taking error code from grpc. ( #172 )
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-09 10:25:50 +08:00
Tao He
7c9b9e5699
Enable grpc timeout support in keepalive's refresh.
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-05-24 00:20:55 +08:00
Tao He
e5f1167c69
Implements the timeout feature to the etcd client.
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-05-22 22:57:38 +08:00
Tao He
8da8946409
Refactor the implementation of sync-client and async-client.
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-05-22 21:42:06 +08:00
Tao He
680e8ad5c6
Replace Tabs in sources and README with spaces.
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-08 20:49:56 +08:00
Tao He
56c7189f92
Revisit the watcher's reconnect functionality.
...
Address #73 , #76 , #117 and #118 .
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-08 19:55:31 +08:00
Tao He
d4975f84b3
Return complete meta information of HEAD. ( #123 )
...
* Return complete meta information of HEAD.
* Fixes the CI by revisiting the LD_LIBRARY_PATH.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-06 16:01:49 +08:00
Matthew Fioravante
1118222b3d
Make revision numbers 64 bit to match proto spec ( #96 )
...
* Make Response::index() 64 bit
* make compact_revision 64 bit
* Make input revision params 64 bit
* make Transaction mod revision 64 bit
* Make Value created and modified index 64 bit
* Fix tests
2021-10-27 10:51:49 +08:00
Tao He
d29e05545d
Implements the put action.
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-10-12 10:17:25 +08:00
Matthew Fioravante
e9db91b335
Allow changing Transaction key ( #93 )
...
* Allow changing Transaction key
* Fixes the compilation errors.
Signed-off-by: Matthew Fioravante <fmatthew5876@gmail.com>
Co-authored-by: Tao He <sighingnow@gmail.com>
2021-10-08 11:12:35 +08:00
Tao He
b99dc2024e
Include compact revision for cancelled watch response. ( #91 )
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-09-28 11:24:11 +08:00
Tao He
6eed82a766
Fixes memory leak in shutting down gRPC streams. ( #88 )
...
* Fixes memory leak in shutting down gRPC streams.
Resolve #86 .
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-09-23 14:51:29 +08:00
mszy
d386bb96b0
Removing memory-leak, fixes #83 . ( #85 )
...
Co-authored-by: morgan.szygenda <morgan.szygenda@scle.fr>
2021-09-22 10:50:33 +08:00
Tao He
cda80854eb
Implements "v3election.proto" APIs. ( #84 )
...
Resolves #81 .
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-09-16 00:46:21 +08:00
Tao He
116b49b784
Lint source code, improve the quality and readability. ( #82 )
...
* Lint the source first, prepare for implementing #81 .
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-09-15 14:59:55 +08:00
Tao He
efcecb7731
Add a "head" method on the client the retrieve the latest revision.
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-06-16 17:10:32 +08:00
Tao He
230ebfd08b
Avoid duplicate const string tags. ( #62 )
...
On behalf of Asplund, Rickard, thanks!
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-05-28 23:22:32 +08:00
Tao He
9e77fdb2ee
Fixes lock, and the underlying keepalive implmentation. ( #60 )
...
* Fixes lock, and the underlying keepalive implmentation.
The previous implementation is buggy when a lot of locks happen at the same time,
as the cpprestsdk's threadpool use a fixed number of thread for posix platform:
https://github.com/microsoft/cpprestsdk/blob/master/Release/src/pplx/threadpool.cpp#L198
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-05-21 18:05:35 +08:00
Tao He
3e30c4c61d
Optimize the implementation of error handling in keep alive. ( #54 )
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-04-07 23:20:33 +08:00
Tao He
cee938fb0a
Use UTF-8 char U+0000 as terminate charactor.
...
Allow setting range end as `NULL`, see also #50 .
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-04-07 15:08:51 +08:00
Tao He
1b24751b9d
List/delete/watch on exact range. ( #51 )
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-04-01 14:50:50 +08:00
Tao He
38366fc5c3
Handle watching on compacted revisions cases.
...
Fixes #43 .
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-02-15 00:13:38 +08:00
Tao He
4f31000cf4
Set a proper upper bound for `ls` request, and remove the default sort options. ( #46 )
...
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-02-12 15:56:09 +08:00
Tao He
d2e35ceb47
Reduce the dependency interface to avoid include all generated protobuf/grpc files. ( #41 )
...
Add CMake config files to make it looks as a cmake module.
Fixes https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/issues/37 .
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-02-06 17:16:58 +08:00
Tao He
66c111b5ca
Test the library on more platforms with more versions of etcd.
...
Squashed commit of the following:
commit 7d15f8f5f9b477f606dbe034f26c37a894eb5b46
Author: Tao He <linzhu.ht@alibaba-inc.com>
Date: Thu Jan 28 10:47:55 2021 +0800
Add a bit more about how to enable authentication on etcd v3.2.x and v3.3.x.
Fixes #33 .
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
commit 9e84e27d480930133d2f2380bed44cb187ff1656
Author: Tao He <sighingnow@gmail.com>
Date: Sun Jan 17 20:59:12 2021 +0800
Tweak LD_LIBRARY_PATH, to include /usr/local/lib.
Signed-off-by: Tao He <sighingnow@gmail.com>
commit c3b913c3c33606caa6ff326639a791e55565da3f
Author: Tao He <linzhu.ht@alibaba-inc.com>
Date: Sat Dec 26 15:27:54 2020 +0800
Test on various versions of Ubuntu and Mac, with different versions of ETCD.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-01-28 13:07:34 +08:00
Tao He
6962030db8
Implements "KeepAlive" feature, and enhance "lock" with a lease.
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-01-10 23:39:50 +08:00
Tao He
e286c36926
Fixes for windows (vcpkg environment) compatibility.
...
Signed-off-by: Tao He <sighingnow@gmail.com>
2020-12-20 00:19:47 +08:00
Tao He
dd1f106150
Make "CancelWatch()" thread-safe and happen only once, fixes the potential assert failure in gRPC routines.
...
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-10-15 19:56:23 +08:00
Tao He
7fe755ae53
Make sure a cancalable watch must be a successful watch.
...
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-10-12 13:19:23 +08:00
Tao He
3305a19d15
Drop the Interceptor-based implementation to be compatible with ealier version of gRPC (pre-0.17.0).
...
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-10-10 20:17:32 +08:00
Tao He
100eae97e9
Improve the etcd watcher to detect error when the connection lost.
...
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-09-30 00:32:00 +08:00
Tao He
6eb725de0e
Add "limit" support on "ls" command.
...
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-09-30 00:32:00 +08:00
Tao He
60ffe62b26
Update accumulated changes.
...
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-09-30 00:32:00 +08:00
Tao He
72b215a513
Re-org v3 related files to make it a submodule.
2020-09-30 00:32:00 +08:00