tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Duplicate handling during copy from one catalog to another

Open pbeaucage opened this issue 1 year ago • 1 comments

This issue is intended to centralize discussion around how to handle duplicate entries when using the functionality added by @danielballan in #735 to copy nodes from one catalog to another with tiled.client.sync.copy. The present behavior is that attempting to insert a node with an exactly-matching uuid to the destination catalog returns a HTTP 409 "Conflict". #737 is a basic stub that adds a feature setting to ignore such responses, but there are many (?) cases where performing a more principled sync, i.e, check for differences and do a differential update, always delete destination and overwrite, would be desirable.

Another question if implementing this is whether look-before-you-leap checking would be more performant, since asking the catalog for just node uuids is relatively cheap compared to accessing full metadata.

pbeaucage avatar May 08 '24 14:05 pbeaucage

I imagine we'll eventually find use cases for ~all of the various rsync options here. I like that the approach in #737 leaves room for the API to grow.

Some things to consider and spin out into separate issues:

  • a CLI like tiled copy ...
  • a progress bar for the CLI and (maybe? optionally?) for the Python API
  • batch upload via new endpoint /nodes/metadata/ that accepts a list of nodes
  • how look-before-you-leap and partial update would interact with batch

danielballan avatar May 08 '24 20:05 danielballan