Project

General

Profile

Feature #17349

Updated by Nico César about 3 years ago

This specification is for the server side (client side of this will be on separate tickets,). The component railsapi (endpoint /arvados/v1/collections) and making sure that controller  

 Current behaviour for collections' "replicas_desired" is to accept a Number[1] or 'null'. This has to be changed the database has the correct field type and stores correctly 

 'null'   

 To complete Epic #16107 all components in Arvados should be able to send a number of storage tiers and their desired replication for each tier.  

 Valid values:  
 <pre> 
 replicas_desired=null (or omited from the request)  
 </pre> 

 |_. Request Values |_. defaultCollectionReplication |_. Effective Value |_. Notes | 
 | replicas_desired=null (or omited from the request)    | 3 | {"default": 3} | current behaviour | 
 | replicas_desired=null (or omited from the request)    |     | {"default": 2} | current behaviour see [2] | 
 | replicas_desired=42    | 2| {"default": 42} |    | 
 | replicas_desired={"default": 34} | 2 | {"default": 34} |    | 
 | replicas_desired={"archival": 1} | 2 | {"default": 1, "archival": 1} | To be talked TALK in next grooming session. GROOMING. | 
 | replicas_desired={"default": 1 "archival": 1} | 2 | {"default": 1, "archival": 1} |    | 
 | replicas_desired={"archival": 2} | 2 | {"default": 0, "archival": 2} | To be talked TALK in next grooming session. GROOMING. | 

 This are values that should be rejected (To be talked in next grooming session) 

 |_. Invalid values |_. Notes | 
 | replicas_desired="42"    | strings should not be allowed | 
 | replicas_desired={"default": "34"} | strings should not be allowed | 
 | replicas_desired={"archival": -1} | negative numbers should not be allowed| 
 | replicas_desired={} | empty    | 

 The "Effective value" has to be stored in the database and when the collection is queried, should be return as a JSON object. 

 To be talked in next grooming session: What should we do when returning current values ? should we return replicas_desired=42 or replicas_desired={"default":42} ?  

 


 [1] https://doc.arvados.org/v2.1/api/methods/collections.html 
 [2] https://doc.arvados.org/v2.0/sdk/python/arvados/arvados.collection-pysrc.html#Collection._my_block_manager

Back