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

Fix the wrong objectID in resolveVineyardObject. #2014

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/graph/loader/arrow_fragment_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@

boost::leaf::result<std::vector<std::vector<std::shared_ptr<arrow::Table>>>>
GatherETables(Client& client,
const std::vector<std::vector<ObjectID>>& estreams, int part_id,

Check warning on line 338 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estreams)

Check warning on line 338 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estreams)
int part_num) {
using batch_group_t = std::unordered_map<
std::string, std::map<std::pair<std::string, std::string>,
Expand All @@ -344,9 +344,9 @@
std::mutex mutex_for_results;
auto reader = [&client, &mutex_for_results, &grouped_batches, part_id,
part_num](size_t const index,
ObjectID const estream) -> Status {

Check warning on line 347 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)

Check warning on line 347 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)
std::vector<std::shared_ptr<arrow::RecordBatch>> batches;
auto status = ReadRecordBatchesFromVineyard(client, estream, batches,

Check warning on line 349 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)

Check warning on line 349 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)
part_id, part_num);
if (status.ok()) {
std::lock_guard<std::mutex> scoped_lock(mutex_for_results);
Expand All @@ -366,28 +366,28 @@
.emplace_back(batch);
}
} else {
LOG(ERROR) << "Failed to read from stream " << ObjectIDToString(estream)

Check warning on line 369 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)

Check warning on line 369 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)
<< ": " << status.ToString();
}
return Status::OK();
};

ThreadGroup tg;
for (size_t index = 0; index < estreams.size(); ++index) {

Check warning on line 376 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estreams)

Check warning on line 376 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estreams)
for (auto const& estream : estreams[index]) {

Check warning on line 377 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)

Check warning on line 377 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estreams)

Check warning on line 377 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)

Check warning on line 377 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estreams)
tg.AddTask(reader, index, estream);

Check warning on line 378 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)

Check warning on line 378 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estream)
}
}
tg.TakeResults();

if (!estreams.empty() && grouped_batches.empty()) {

Check warning on line 383 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estreams)

Check warning on line 383 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (estreams)
grouped_batches[std::to_string(0)][std::make_pair("", "")] = {};
}

std::vector<std::vector<std::shared_ptr<arrow::Table>>> tables;
for (auto const& group : grouped_batches) {
std::shared_ptr<arrow::Table> table;
std::vector<std::shared_ptr<arrow::Table>> subtables;

Check warning on line 390 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (subtables)

Check warning on line 390 in modules/graph/loader/arrow_fragment_loader.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (subtables)
for (auto const& subgroup : group.second) {
if (subgroup.second.empty()) {
table = nullptr; // no tables at current worker
Expand Down Expand Up @@ -553,7 +553,7 @@
// encoding: 'o' prefix for object id, and 's' prefix for object name.
CHECK_OR_RAISE(!source.empty() && (source[0] == 'o' || source[0] == 's'));
if (source[0] == 'o') {
sourceId = vineyard::ObjectIDFromString(source.substr(1));
sourceId = vineyard::ObjectIDFromString(source);
} else {
VY_OK_OR_RAISE(client_.GetName(source.substr(1), sourceId, true));
}
Expand Down
Loading