JosiahWI commented on code in PR #10603:
URL: https://github.com/apache/trafficserver/pull/10603#discussion_r1362219571


##########
iocore/cache/CacheEvacuateDocVC.h:
##########
@@ -0,0 +1,72 @@
+/** @file
+
+  A brief file description
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you 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.
+ */
+
+#pragma once
+
+/*
+#include "P_CacheDir.h"
+*/
+
+#include "CacheVC.h"
+
+// eventsystem
+#include "I_Continuation.h"
+#include "I_EThread.h"
+#include "I_Event.h"
+#include "I_ProxyAllocator.h"
+
+// tscore
+#include "tscore/ink_assert.h"
+
+// ts
+#include "ts/DbgCtl.h"
+
+class CacheEvacuateDocVC : public CacheVC

Review Comment:
   @masaori335 There's a flag that indicates whether the CacheVC is an 
evacuator or not. In `agg_copy` evacuated docs have to have different handling, 
so the flag is used to determine which algorithm to use. That is the only place 
`overwrite_dir` is set on a `CacheVC` instead of `CacheEvacuateDocVC`. If we 
move `agg_copy` into `CacheVC`, we can use dynamic dispatch to get the correct 
copy algorithm, move `overwrite_dir` to the `CacheEvacuateDocVC`, and 
completely do away with the `f.evacuator` flag. But that's quite a lot of 
changes so maybe we should do it in a follow-up PR.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to