brpc icon indicating copy to clipboard operation
brpc copied to clipboard

brpc lack of rwlock implementation

Open htn4179 opened this issue 5 years ago • 7 comments

we want to use bthread_rwlock_t in our program, but it seems that brpc did not implemented.

htn4179 avatar Jan 17 '20 11:01 htn4179

https://github.com/hairet/brpc/commit/b2f23243ba3127db82d7ee17e6caba40bead0ef3

hairet avatar Jan 19 '20 07:01 hairet

you can use this commit,we implement rwlock,and I commit in my fork recently

hairet avatar Jan 19 '20 07:01 hairet

so which one is the latest? https://github.com/apache/incubator-brpc/pull/1031 or https://github.com/apache/incubator-brpc/pull/1026?

zyearn avatar Jan 19 '20 13:01 zyearn

so which one is the latest? #1031 or #1026?

the implementation in 1031 will be more clear,it should be the latest

but in 1031 I got some error when travis-ci do linking like bvar_percentile_unittest.cpp:(.text+0x35): undefined reference to `bvar::detail::Percentile::Percentile()' this seems unreasonable as bavr test and bavr cc_library are not modified in my commit

hairet avatar Jan 20 '20 02:01 hairet

so which one is the latest? #1031 or #1026?

#1031 is classic and less flag and status, #1026 has more flag and status, We maximize the read performance, So, I think it is your choice

htn4179 avatar Jan 20 '20 03:01 htn4179

@zyearn I recently repick some issue and find this rwlock is still not in brpc master. And I updated commit today for #1031 to fix some infrequent bugs which commited 2 years ago in our inner brpc. As #1031 had already stable used in our company in our inner brpc for more than 2 years, I think maybe you can merge this PR now.If there's any worry, maybe you can contact me,Thanks. FYI, #1026 is also mantained by us,but it's an experimental version, we don't use this recent 2 years.

hairet avatar Aug 24 '22 07:08 hairet

@hairet Thanks for uploading the latest version.

zyearn avatar Aug 24 '22 20:08 zyearn