-
Notifications
You must be signed in to change notification settings - Fork 71
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
#64: Speedb artifacts #66
Conversation
Note that due to the merge of #25, Update: not relevant anymore with the integration of #77. |
73f7ff2
to
f19fb7e
Compare
A basic question about the new names. |
The SpeeDB spelling should not be used according to marketing. So that leaves us with:
|
I see that the files used to create the speedb_dump / speedb_undump remain rocksdb_dump* / rocksdb_undump*. That seems a bit weird IMO. |
I see multiple references to rocksdb/version.h still in the repo. Is that on purpose: |
That's indeed weird, but the idea is to keep the code changes to a minimum (in this case it's only for avoiding pain in future rebases). Since we only care about the output artefacts, this is enough to fulfill this requirement.
|
f19fb7e
to
1f0c677
Compare
I did find a place where the SpeeDB spelling was used and I forgot to update it, so I pushed a fix. |
1f0c677
to
5520d41
Compare
build_tools/build_detect_platform
Outdated
echo "ROCKSDB_MAJOR=$ROCKSDB_MAJOR" >> "$OUTPUT" | ||
echo "ROCKSDB_MINOR=$ROCKSDB_MINOR" >> "$OUTPUT" | ||
echo "ROCKSDB_PATCH=$ROCKSDB_PATCH" >> "$OUTPUT" | ||
echo "SPEEDB_MAJOR=$SPEEDB_MAJOR" >> "$OUTPUT" | ||
echo "SPEEDB_MINOR=$SPEEDB_MINOR" >> "$OUTPUT" | ||
echo "SPEEDB_PATCH=$SPEEDB_PATCH" >> "$OUTPUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does both speedb and rocksdb version information need to be present in the platform.mk file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make_config.mk
is only used by the Makefile, so there's no need for both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change is more than is necessary and is going to be hard to maintain and test going forward. Changing the names of the variables and targets in the Makefile is not really necessary and is likely to be more pain that it is worth.
Many of these changes can be separated into a separate upstreamable PR (like allowing the names of libraries to change, adding a LITE mode status.
388c951
to
fdd806d
Compare
@isaac-io - I am done. I have no further comments |
fdd806d
to
f87412a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel there are way more changes here than are necessary for branding. We should be focusing on only change the names of the artifacts (libraries, packages, etc) and not the names of all of the compiler flags.
f87412a
to
3b0da0b
Compare
Updated the PR to reduce the scope of the changes to the artefact names, logging, and version numbers only. Some of the work (setting the library name based on the project name, removing explicit mentions of RocksDB in status strings, etc.) can theoretically be upstreamable, if RocksDB would be open to accepting something like that. |
3b0da0b
to
2b3b558
Compare
2b3b558
to
08f1f93
Compare
tools/db_bench_tool.cc
Outdated
fprintf(stderr, "Speedb: version %s\n", | ||
GetSpeedbVersionAsString(false).c_str()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just use the GetRocksBuildInfoAsString method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it breaks the output formatting (alignment of the "version ..." string with the subsequently printed lines).
fuzz/Makefile
Outdated
LDFLAGS += $(PLATFORM_LDFLAGS) $(LIB_FUZZING_ENGINE) $(PROTOBUF_MUTATOR_LDFLAGS) $(PROTOBUF_LDFLAGS) -L$(LIB_LIB_DIR) -l$(LIBNAME:lib%=%) | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think LIBNAME is specified here, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, through the inclusion of make_config.mk
. The fuzz Makefile is a weird creature. It requires manually building the library with fuzzing enabled and then cd'ing into the fuzz directory and building the fuzzing tools.
@@ -4443,7 +4443,7 @@ void DBImpl::EraseThreadStatusDbInfo() const {} | |||
// | |||
// A global method that can dump out the build version | |||
void DumpRocksDBBuildVersion(Logger* log) { | |||
ROCKS_LOG_HEADER(log, "SpeeDB version: %s (%s)\n", | |||
ROCKS_LOG_HEADER(log, "Speedb version: %s (%s)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a method that gets/prints both already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in this specific format. Changing the format will break tools the grep the log output to find the version (we have internal tools that do just that).
cache/cache_bench_tool.cc
Outdated
printf("Speedb version : %s\n", | ||
GetSpeedbVersionAsString(false).c_str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the print method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The print method breaks the formatting of the output (alignment of the colon).
Makefile
Outdated
LIB_JAVA_VERSION ?= $(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH) | ||
LIB_JAR = $(PROJECT_NAME)jni-$(LIB_JAVA_VERSION)-linux$(ARCH)$(JNI_LIBC_POSTFIX).jar | ||
LIB_JAR_ALL = $(PROJECT_NAME)jni-$(LIB_JAVA_VERSION).jar | ||
LIB_JAVADOCS_JAR = $(PROJECT_NAME)jni-$(LIB_JAVA_VERSION)-javadoc.jar | ||
LIB_SOURCES_JAR = $(PROJECT_NAME)jni-$(LIB_JAVA_VERSION)-sources.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a huge fan of these LIB_xxx names. The LIB_ does not really convey much to me. Seems like we could come up with something better or just drop the lib part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropping the LIB_
part is a bit difficult for naming these variables, especially for LIB_JAVA_VERSION
where it would change the meaning completely. That prefix conveys the meaning that those variables are internal to the library. I can probably append NAME
where applicable, but it wouldn't make the LIB_
prefix redundant.
08f1f93
to
1123fd5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not run any of the tests on this code. If it passes the C++ and Java test suite, good enough for me.
build_tools/build_detect_platform
Outdated
LIB_MAJOR=`build_tools/version.sh major` | ||
LIB_MINOR=`build_tools/version.sh minor` | ||
LIB_PATCH=`build_tools/version.sh patch` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think these would be better named as "MAJOR_VERSION, MINOR_VERSION" etc. The "LIB" part seems off to me for some reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed them to VERSION_MAJOR
, VERSION_MINOR
, and VERSION_PATCH
to mirror the existing SHARED_MAJOR
etc. variables.
46eb01d
to
2ed6e6f
Compare
c288740
to
2b4a6c0
Compare
2b4a6c0
to
ff6bb48
Compare
ff6bb48
to
b5f692e
Compare
This updates the CMake and Makefile configuration and related scripts to use variables where possible and avoid explicit references to RocksDB in order to allow rebranding of the output artefacts.
This includes both the CMake and Makefile configurations, various scripts that are invoked during the build or during test runs, as well as the Java native library loader code.
This includes simple renaming from `rocksdb` to `speedb` as well as replacing URLs that are pointing to the RocksDB repository with the URL of the Speedb repository.
This includes references in statuses as well as tools output.
This is done across all tools except trace_replay, which specifically looks for the RocksDB version for database compatibility checks.
b5f692e
to
456a5bc
Compare
Both were incorrectly referencing the old artefact names before the changes in #66.
Both were incorrectly referencing the old artefact names before the changes in #66.
Both were incorrectly referencing the old artefact names before the changes in #66.
Both were incorrectly referencing the old artefact names before the changes in #66.
Both were incorrectly referencing the old artefact names before the changes in #66.
Both were incorrectly referencing the old artefact names before the changes in #66.
Both were incorrectly referencing the old artefact names before the changes in #66.
Both were incorrectly referencing the old artefact names before the changes in #66.
Both were incorrectly referencing the old artefact names before the changes in #66.
Both were incorrectly referencing the old artefact names before the changes in #66.
This PR implements the initial phase of the Speedb artefacts differentiation (#64). That phase deals with renaming the output artefacts from RocksDB to Speedb, as well as replacing any references to RocksDB that are outputted by the code to Speedb.
This includes:
librocksdb.{a,so}
->libspeedb.{a,so}
(and the SO name was changed from 7.2.2 to 1.5.0)librocksdbjni*.{a,so}
->libspeedbjni*.{a,so}
(the same SO name change was made here as well)rocksdbjni*.jar
->speedbjni*.jar
(here too, the JAR bears the Speedb version now)Additionally, the following tools with RocksDB in their name have been renamed:
rocksdb_dump
->speedb_dump
rocksdb_undump
->speedb_undump
As part of the build changes, all build-time configuration variables were changed from
ROCKSDB_*
toSPEEDB_*
(e.g.ROCKSDB_LITE
is nowSPEEDB_LITE
. Note that only the build-time configuration was changed. The macro in the source code is still namedROCKSDB_LITE
), and the CMake package name is nowSpeedb::speedb
instead ofRocksDB::rocksdb
.Version information that is printed by tools was changed to use the Speedb version information (except for
trace_replay
which uses that information as database version for format compatibility checks).Additionally, a bunch of scripts were updated to point at the Speedb repository instead of the RocksDB one and to refer to the newly introduced artefact names.
For ease of review, the changes were broken into categories, each in its own commit, the largest of which is unfortunately the first one which deals with build-related changes.
Test Plan: Build all
make
and CMake targets and runmake check
andmake jtest
.