You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/04/30 07:58:19 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #4665: Support IMS header in Get endpoints

ocket8888 commented on a change in pull request #4665:
URL: https://github.com/apache/trafficcontrol/pull/4665#discussion_r417825474



##########
File path: traffic_ops/app/db/migrations/20200424000000_add_deleted_tables.sql
##########
@@ -0,0 +1,608 @@
+/*
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+
+CREATE TABLE IF NOT EXISTS deleted_api_capability (
+    id bigserial PRIMARY KEY,

Review comment:
       Looking around at the way other projects implement this, it looks like they typically do one of two things:
   
   - Implement a `last_deleted` timestamp table with one row for each table that just stores the timestamp of the last deletion. That returns payloads which invalidate unnecessarily sometimes but are still a useful improvement over nothing, or
   - Don't support IMS on collections of objects. Just use ETags for collections, and support IMS on single objects.
   
   Those both seem fine to me - and I didn't look too hard at the DB implementation tbh because I thought he wanted me specifically to look at the API code and it's still just a draft - but I share Rawlin's reservations about creating tables to shadow all data that ever existed in the database.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org