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

Performance fixes #307

Merged
merged 12 commits into from
Nov 1, 2021
Merged

Performance fixes #307

merged 12 commits into from
Nov 1, 2021

Conversation

MeirShpilraien
Copy link
Collaborator

No description provided.

@MeirShpilraien
Copy link
Collaborator Author

Tests failure are the same as on master

ashtul
ashtul previously approved these changes Oct 28, 2021
Copy link
Contributor

@ashtul ashtul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
A few questions.

@@ -8,7 +8,7 @@
#include "command.h"
#include "dep/triemap/triemap.h"

#define MR_CONN_POOL_SIZE 4
#define MR_CONN_POOL_SIZE 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this related?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a single connection we spare Redis from switching the connections it reads from and we maximize throughput.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a small comment there on the performance impact?

Comment on lines +195 to +199
RSValue *v = RS_NullVal();
if (i + 1 < MRReply_Length(rep)) {
MRReply *val = MRReply_ArrayElement(rep, i + 1);
v = MRReply_ToValue(val);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the path for the bug exposed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, position i+1 might not exist in case of error.

ashtul
ashtul previously approved these changes Nov 1, 2021
@rafie rafie requested review from ashtul and rafie November 1, 2021 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants