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

feat(server): Implemented periodic snapshotting (#161) #250

Merged
merged 4 commits into from
Aug 26, 2022

Conversation

braydnm
Copy link
Contributor

@braydnm braydnm commented Aug 21, 2022

Signed-off-by: Braydn braydn.moore@uwaterloo.ca

* feat(test): Added the ability to specify dragonfly cli parameters on a test basis (dragonflydb#199)

Signed-off-by: Braydn <braydn.moore@uwaterloo.ca>
@romange
Copy link
Collaborator

romange commented Aug 22, 2022

Thanks, I will review it shortly! :)

Please join our discord and say hello! :)

@romange
Copy link
Collaborator

romange commented Aug 22, 2022

Awesome contribution and thanks for raising the bar with pytest code! 💯
Please add yourself to CONTRIBUTORS.md file

src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
tests/pytest/test_dragonfly.py Outdated Show resolved Hide resolved
This was linked to issues Aug 22, 2022
Code cleanup & CONTRIBUTORS.md modifcation

Signed-off-by: Braydn <braydn.moore@uwaterloo.ca>
src/server/server_family.cc Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
src/server/server_family.cc Outdated Show resolved Hide resolved
tests/pytest/snapshot_test.py Outdated Show resolved Hide resolved
tests/pytest/snapshot_test.py Outdated Show resolved Hide resolved
tests/pytest/snapshot_test.py Outdated Show resolved Hide resolved
tests/pytest/snapshot_test.py Outdated Show resolved Hide resolved
snapshot_fiber_ = service_.proactor_pool().GetNextProactor()->LaunchFiber([save_spec = std::move(spec.value()), this] {
SnapshotScheduling(std::move(save_spec));
});
}
Copy link
Collaborator

@romange romange Aug 23, 2022

Choose a reason for hiding this comment

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

formatting is wrong here. "else" should be on the same line with "} "

});
}
else {
LOG(WARNING)<<"Invalid snapshot time specifier "<<save_time;
Copy link
Collaborator

Choose a reason for hiding this comment

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

spaces around "<<"

Parsing and race condition fixes. Improved pytests

Signed-off-by: Braydn <braydn.moore@uwaterloo.ca>
Copy link
Collaborator

@romange romange left a comment

Choose a reason for hiding this comment

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

We are done ,🚀 Thank you very much!

You just need to pull the helio submodule and add it to this pr.

import time
import os

OUT_DIR = TemporaryDirectory()
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's not used, imho

@@ -0,0 +1,28 @@
from pathlib import Path
from tempfile import TemporaryDirectory
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's not needed, imho

@braydnm
Copy link
Contributor Author

braydnm commented Aug 25, 2022

@romange I ended up cleaning up the test cases and adding documentation for writing tests to the README file. Do you want those changes included in this PR or should I open a new one focused on test changes?

@romange
Copy link
Collaborator

romange commented Aug 26, 2022

It's fine adding here @braydnm

…#199)

- Moved tests into their own file
- Renamed test namespace to avoid naming conflicts with pytest
- Updated requirements.txt to make test environment reproducible
- Added documentation to write tests

feat(server): Updated helio submodule

Signed-off-by: Braydn <braydn.moore@uwaterloo.ca>
Copy link
Collaborator

@romange romange left a comment

Choose a reason for hiding this comment

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

🚀 🚀

@romange romange merged commit b7f85e5 into dragonflydb:main Aug 26, 2022
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.

improve our pytest framework Periodical Snapshotting
2 participants