-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Proposed Change] Skip File Ref Validation Logic; Improve Logs #1310
Conversation
@@ -41,8 +41,10 @@ public StepResult doStep(FlightContext context) throws InterruptedException { | |||
for (Column column : table.getColumns()) { | |||
if (column.isFileOrDirRef()) { | |||
List<String> refIdArray = bigQueryDatasetPdao.getRefIds(dataset, stagingTableName, column); | |||
List<String> badRefIds = fileDao.validateRefIds(dataset, refIdArray); | |||
badRefIds.forEach(id -> invalidRefIds.add(new InvalidRefId(id, column.getName()))); | |||
if (!refIdArray.isEmpty()) { |
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 check should be done inside FireStoreDao.validateRefIds()
instead of in the caller, since it's an optimization that method can do regardless of who calls validateRefIds()
. It could even be pushed one layer down into FireStoreDirectoryDao.validateRefIds()
.
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.
Good point - I've moved it to the directory dao.
8a3fabc
to
5103579
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.
Looks ok to me. I wonder if some of our log.infos can become log.debugs as we have less need to see what the code is doing.
Note: There isn't yet a ticket for this work because I'm not sure if we want to make this change. If there is agreement that this change should be made, then can create a ticket!
Background
We were recently trying to figure out what went wrong with a user's ingest request. We encountered a batch of strange-looking logs:
While the logs look strange, they're actually okay. Each log indicates that we are performing a check against a column designated as a fileref. This particular ingest was only ingesting files into a single column. We were left with a wall of unhelpful logs.
Relevant code:
Issues
Proposal