jcorry / jcorry/nmap-scan-api

Edge case: batch insert fails leaving orphaned file import

Open
#13 0 comments 0 reactions 1 assignee Claimed by @jcorry View on GitHub
bug good first issue
Dominant language
Go
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Handle the case where the file was accepted on upload and its hash saved
to the imports table but the batch insert of hosts fails, rolls back and leaves the hash in the imports table. This case would prevent the user from ever successfully uploading that file.

The simple fix is to write a file import delete method and call it with the file hash if the hosts batch insert fails.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.