Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove spinlock in MetaClient #2786

Closed
critical27 opened this issue Sep 2, 2021 · 6 comments
Closed

Remove spinlock in MetaClient #2786

critical27 opened this issue Sep 2, 2021 · 6 comments
Assignees
Labels
priority/hi-pri Priority: high type/enhancement Type: make the code neat or more efficient

Comments

@critical27
Copy link
Contributor

critical27 commented Sep 2, 2021

Bottleneck when compaction. getTagSchema/getEdgeSchema. Use either threadlocal or rcu will be fine.

@critical27 critical27 added the type/enhancement Type: make the code neat or more efficient label Sep 2, 2021
@critical27 critical27 changed the title Remove getTagSchema/getEdgeSchema and so on spinlock in MetaClient Remove spinlock in MetaClient Sep 2, 2021
@cangfengzhs
Copy link
Contributor

cangfengzhs commented Sep 5, 2021

Writing will still block reading when using threadlocal, RCU may be a better choice.And using RCU with doublebuffer may further improve performance by reducing cache line invalidation.

@critical27
Copy link
Contributor Author

Talked offline. It is ok to use a threadlocal variable in this case. We only need to block when cache need to update, which is rare case.

@CPWstatic
Copy link
Contributor

We had a threadlocal implementation in nebula1.0.

@critical27
Copy link
Contributor Author

It seems it is a great bottleneck when rebuild index. Wait vesoft-inc/nebula-common#440 move to nebula

@Sophie-Xie
Copy link
Contributor

@critical27 Will it be resolved in v2.6.0?

@critical27
Copy link
Contributor Author

addressed in 3.0

yixinglu pushed a commit to yixinglu/nebula that referenced this issue Sep 14, 2023
Change the check period back

Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/hi-pri Priority: high type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

4 participants