Open helio-frota opened 3 days ago
does this cause any errors of the upload process?
yes
And that is random influenced by concurrency (still don't know what part of the code is causing it). When I use this test to 'simulate' the browser upload with multiple files, selecting only these files i shared in the previous comment I can see a % of 80% pass 20% error locally, via browser is the contrary 20% pass 80% error. ( not exactly 80-20 ofc, I'm just sharing the behavior situation )
Ah I see. Ok, then I'd suggest to check if we can turn this into an "upsert". "insert … on conflict … do nothing".
yeah thanks but I already tried this with no success as the table contains 2 constraints, and currently using the package_pkey
for this.
rsql> .describe base_purl
Column | Type | Not null | Default
-----------+-------------+----------+---------
id | uuid | No |
timestamp | timestamptz | Yes | now()
type | varchar | No |
namespace | varchar | Yes |
name | varchar | No |
Indexes
Index | Columns | Unique
---------------------------------+-----------------------+--------
base_purl_id_idx | id | No
basepurlnameginidx | name | No
basepurlnamespaceginidx | namespace | No
basepurltypeginidx | type | No
package_pkey | id | Yes
package_type_namespace_name_key | namespace, name, type | Yes
Unless I'm doing something wrong with sea-orm, when I change something related with on_conflict it fails with the other constraint package_type_namespace_name_key
This is happening on current main branch
Steps:
rm -Rf .trustify
cargo run --bin trustd
trustify/etc/test-data/csaf/
foo.zip( I got those files via an old version before this with the command
cargo run --bin xtask generate-dump -w ....
)