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

22 spdb memtable 2.1 release #242

Closed
wants to merge 19 commits into from
Closed

Conversation

Guyme
Copy link

@Guyme Guyme commented Nov 13, 2022

No description provided.

isaac-io and others added 19 commits October 26, 2022 17:40
In the case where we create the test path, we should clean up after the
run finishes as done in the Makefile, due to garbage that is left behind
by tests and accumulates.

While at it, randomise test scheduling in order to increase the likelihood
of surfacing latent bugs that are hidden by the execution order.
The build tag can be set during the build (using either the Makefile
or the CMake). If it's not provided, and we're not in a release build,
it will be calculated using the state of the git tree since the last
release tag (for example, for this PR the build tag will be calculated as
`(main+17)-(156-build-add-a-build-tag-into-the-version-for-non-release-builds+1)`.

If the git tree state can not be determined, a question mark will be
used instead.
Add support for detecting and using ccache/sccache to the Makefile build
in order to speed up build times as it's done in the CMake configuration.
This is a continuation of #126 with changes that were missed there in case
a CF drop was encountered after the flush was completed but before or during
manifest write.

Rolling back on CF drop is meaningless because a flush is not possible
in that state, and the only path forwards is for the memtables to be freed
shortly afterwards, so making them available for flush again is useless
at best.

Additionally, this might be needed for the WriteBufferManager changes in
in the future for triggering flushes based on immutable memory as well,
and rolling back flushes causes the memtable memory to become ready for
flush again for a brief period of time until it is dropped, which might
wrongly affect the WBM decisions.

Finally, the code installs a new version even if no changes are made. This
is unnecessary and as such that part is moved into the version-mutating
code path only.

This PR also adds two regression tests, so we could rely on rollback not
being performed on CF drop.
…#217)

In #194 the default value for background compaction threads was changed
to 8 (from 1). This caused some tests to fail and fixes were implemented
as part of #197. Alas, it seems that the fixes weren't complete, as under
stress a test still fail.

Make it so the test is truly fixed now. This can be verified by running
them in a loop with the machine overloaded:

```
$ while ./deletefile_test --gtest_filter=DeleteFileTest.BackgroundPurgeCFDropTest; do sleep 1; done
```
Both were incorrectly referencing the old artefact names before the
changes in #66.
The changes in #157 were accidentally applied to the `GetRocksVersionAsString()`
function instead of the `GetSpeedbVersionAsString()` function. This replaced
the RocksDB patch number with the Speedb one, and added the build tag in
the wrong place.

Fix it by moving the logic to the intended function.
Specify `SPDB_RELEASE_BUILD` to both CMake and the Makefile builds in order
to get the release artefacts to build without a build tag of `?`.
)

Merge commits were incorrectly handled due to the named use of `git rev-list`,
which does not give an ancestry path as I expected, but simply a list of
unique commits between the two refs.

Additionally, the check for the base tag was wrong in the face of merge
commits, since a tag could be an ancestor through a merge commit, but not
be the actual base of the branch.

Both of these issues resulted in an incorrect tag being calculated, as well
as a build slowdown due to the iteration over all of the commits from the
other parent of the merge commit, which is unneeded.

While at it, add logic for caching the build tag in order to speed up
builds when the checked-out git tree hasn't changed.
fix by adding WaitUntilSleeping before deleting the iterator
crashtest: adjust how speedb memtable is decided

Import shorten memtable switch latency #14
@Yuval-Ariel
Copy link
Contributor

duplicate of #188

@Yuval-Ariel Yuval-Ariel deleted the 22-spdb-memtable-2.1-release branch May 11, 2023 08:29
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.

6 participants