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

chore(search): Fix expiry test #2136

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Conversation

dranikpg
Copy link
Contributor

@dranikpg dranikpg commented Nov 6, 2023

Trying to run it on CI

@@ -570,7 +570,7 @@ TEST_F(SearchFamilyTest, SimpleExpiry) {
EXPECT_THAT(Run({"ft.search", "i1", "*"}), AreDocIds("d:1"));

Run({"flushall"});
EXPECT_EQ(used_mem_current.load(), 0);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently the heartbeat has enough time on CI to recompute the memory budget

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand this comment 🙃
And also - why do you now drop the index? Don't you want at least to verify we don't get an error reply?
I guess FLUSHALL shouldn't drop indices, but I just want to make sure that's how it's designed to work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand this comment 🙃

used_mem_current is always zero, unless the heartbeat does more than 8 iterations and the value is updated. Because the we preallocate some stuff, it goes up immediately. I added this check because it blocked other values from being added

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And also - why do you now drop the index?

It slipped in accidentally when I experimented with this value and I just didn't exclude it... Just removed it

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should be dropping indices on flushall, but just wanted to make sure you agree :)
Anyway, sg.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't drop

@dranikpg dranikpg requested a review from chakaz November 7, 2023 06:31
Signed-off-by: Vladislav Oleshko <[email protected]>
@@ -570,7 +570,7 @@ TEST_F(SearchFamilyTest, SimpleExpiry) {
EXPECT_THAT(Run({"ft.search", "i1", "*"}), AreDocIds("d:1"));

Run({"flushall"});
EXPECT_EQ(used_mem_current.load(), 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should be dropping indices on flushall, but just wanted to make sure you agree :)
Anyway, sg.

@dranikpg dranikpg merged commit b7cbdca into dragonflydb:main Nov 7, 2023
7 checks passed
@dranikpg dranikpg deleted the search-test-fix branch November 9, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants