Skip to content

Commit

Permalink
derivedFrom: don't LOG(ERROR) if the ownership set is empty
Browse files Browse the repository at this point in the history
Summary:
This can happen if we didn't record ownership for the base facts in
the DB, it's not an error necessarily.

Reviewed By: josefs

Differential Revision: D51254522

fbshipit-source-id: a664a36e47d046055d37887c9bbb31b241f74c98
  • Loading branch information
Simon Marlow authored and facebook-github-bot committed Nov 13, 2023
1 parent 0342ad7 commit d8fff23
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions glean/rts/ownership/derived.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace rts {

void DefineOwnership::derivedFrom(Pid pid, Id id, const std::set<UsetId>& deps) {
if (deps.size() == 0) {
LOG(ERROR) << "DefineOwnership::derivedFrom: empty deps";
return;
}

Expand Down Expand Up @@ -264,8 +263,10 @@ void addDerived(
}
}

for (auto id : facts) {
define->derivedFrom(pid, id, owners);
if (owners.size() > 0) {
for (auto id : facts) {
define->derivedFrom(pid, id, owners);
}
}
}
}
Expand Down

0 comments on commit d8fff23

Please sign in to comment.