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

Remote backend for PyG #1418

Merged
merged 1 commit into from
Apr 2, 2023
Merged

Remote backend for PyG #1418

merged 1 commit into from
Apr 2, 2023

Conversation

mewim
Copy link
Collaborator

@mewim mewim commented Mar 29, 2023

No description provided.

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Patch coverage: 89.28% and project coverage change: +0.07 🎉

Comparison is base (8a5a826) 92.64% compared to head (6ee6705) 92.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1418      +/-   ##
==========================================
+ Coverage   92.64%   92.72%   +0.07%     
==========================================
  Files         650      651       +1     
  Lines       22613    22749     +136     
==========================================
+ Hits        20949    21093     +144     
+ Misses       1664     1656       -8     
Impacted Files Coverage Δ
src/include/main/query_result.h 100.00% <ø> (ø)
src/include/storage/storage_structure/column.h 94.84% <ø> (ø)
tools/python_api/src_cpp/include/py_connection.h 100.00% <ø> (ø)
tools/python_api/src_cpp/include/py_database.h 100.00% <ø> (ø)
tools/python_api/src_cpp/py_connection.cpp 88.74% <75.80%> (-9.04%) ⬇️
src/common/types/types.cpp 83.33% <100.00%> (+0.27%) ⬆️
src/main/storage_driver.cpp 100.00% <100.00%> (ø)
src/storage/storage_structure/column.cpp 92.41% <100.00%> (+0.62%) ⬆️
tools/python_api/src_cpp/py_database.cpp 100.00% <100.00%> (ø)
tools/python_api/src_cpp/py_query_result.cpp 97.61% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mewim mewim force-pushed the pyg-remote-backend branch 3 times, most recently from 52bd939 to 8c098f6 Compare March 29, 2023 16:19

~StorageDriver();

std::pair<std::unique_ptr<uint8_t[]>, size_t> scan(const std::string& nodeName,
Copy link
Contributor

Choose a reason for hiding this comment

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

I would wrap the pair into a struct:

struct Buffer {
    std::unique_ptr<uint8_t> data;
    std::size_t size;
}

auto frame = bufferManager.pin(*fileHandleToPin, pageIdxToPin);
auto frameBytesOffset = getElemByteOffset(cursor.elemPosInPage);
memcpy(result + i * elementSize, frame + frameBytesOffset, elementSize);
bufferManager.unpin(*fileHandleToPin, pageIdxToPin);
Copy link
Contributor

Choose a reason for hiding this comment

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

L19 - L22 :

        bufferManager.optimisticRead(*fileHandleToPin, pageIdxToPin, [&](uint8_t* frame) -> void {
            auto frameBytesOffset = getElemByteOffset(cursor.elemPosInPage);
            memcpy(result + i * elementSize, frame + frameBytesOffset, elementSize);
        });

@mewim mewim force-pushed the pyg-remote-backend branch 5 times, most recently from 0f22317 to 19b5e0a Compare April 2, 2023 04:11
std::unordered_map<std::string, std::shared_ptr<Value>> parameters;
parameters["s"] = std::make_shared<Value>(start);
parameters["e"] = std::make_shared<Value>(end);
std::cout << "Batch " << batch << " from " << start << " to " << end << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should remove before the final release. But let's keep it for benchmark purpose

@mewim mewim merged commit 9cd0309 into master Apr 2, 2023
@mewim mewim deleted the pyg-remote-backend branch April 2, 2023 04:32
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.

None yet

3 participants