nci/gsky

shard_create.sh doesn't guard against different gpath for same shard code

Closed this issue · 0 comments

The combination of shard code and gpath in the public.shards table must be unique. Now consider this scenario: when a user calls shard_create.sh with an existing shard code but the user supplied gpath is different from the gpath associated with the existing shard code in MAS database. Apparently, shard_create.sh assumes shard existed and skips shard creation. If the user then proceed with data ingestion, the data will be ingested into the same shard but with a different gpath. Therefore, the newly ingested data will never be retrieved later.