-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Adding flatbuffers and migrating flatcc to flatbuffers for plasma #325
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
Adding flatbuffers and migrating flatcc to flatbuffers for plasma #325
Conversation
build.sh
Outdated
@@ -25,7 +25,7 @@ bash "$ROOT_DIR/src/numbuf/thirdparty/build_thirdparty.sh" | |||
|
|||
# Now build everything. | |||
pushd "$ROOT_DIR/python/core" | |||
cmake ../.. | |||
cmake -DCMAKE_BUILD_TYPE=Release ../.. |
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.
will this cause all of the DCHECK
's to stop working?
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.
No
src/common/CMakeLists.txt
Outdated
@@ -34,7 +34,7 @@ target_link_libraries(common "${CMAKE_CURRENT_LIST_DIR}/thirdparty/hiredis/libhi | |||
|
|||
function(define_test test_name library) | |||
add_executable(${test_name} test/${test_name}.c ${ARGN}) | |||
add_dependencies(${test_name} hiredis flatcc) | |||
add_dependencies(${test_name} hiredis flatcc flatbuffers_ep) | |||
target_link_libraries(${test_name} common ${FLATBUFFERS_STATIC_LIB} ${library}) | |||
target_compile_options(${test_name} PUBLIC "-DPLASMA_TEST -DPHOTON_TEST -DCOMMON_TEST -DRAY_COMMON_LOG_LEVEL=4 -DRAY_TIMEOUT=50") | |||
endfunction() |
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.
Removing src/common/build/.gitkeep
(not this file, but the next one in the PR) was unintentional, right?
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.
Same with src/global_scheduler/build/.gitkeep
and src/photon/build/.gitkeep
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.
These .gitkeeps are not used any more. Not sure it should be part of this PR but they should be removed...
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.
Oh I see.
src/plasma/plasma_protocol.c
Outdated
@@ -76,7 +76,10 @@ int finalize_buffer_and_send(flatcc_builder_t *B, int fd, int message_type) { | |||
void *buff = flatcc_builder_finalize_buffer(B, &size); | |||
int r = write_message(fd, message_type, size, buff); | |||
free(buff); | |||
flatcc_builder_reset(B); | |||
if (!(message_type == MessageType_PlasmaCreateRequest || message_type == MessageType_PlasmaSealRequest)) { |
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.
Is this still relevant?
src/plasma/plasma_protocol.cc
Outdated
auto message = flatbuffers::GetRoot<PlasmaCreateRequest>(data); | ||
*data_size = message->data_size(); | ||
*metadata_size = message->metadata_size(); | ||
CHECK(message->object_id()->size() == UNIQUE_ID_SIZE); |
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.
We probably shouldn't use the UNIQUE_ID_SIZE
macro, but instead use e.g., sizeof(*object_id)
.
src/plasma/plasma_protocol.cc
Outdated
char **address, | ||
int *port) { | ||
DCHECK(data); | ||
/* */ |
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.
/* */
is unused
f3d0f05
to
fcfc419
Compare
fcfc419
to
37b98e1
Compare
Test FAILed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Test PASSed. |
Test FAILed. |
Test FAILed. |
Oh wow, thanks for catching that 🥇 |
Test FAILed. |
Test FAILed. |
Test FAILed. |
Merged build finished. Test FAILed. |
Test FAILed. |
No description provided.