File tree Expand file tree Collapse file tree 1 file changed +20
-14
lines changed
src/query/service/src/interpreters Expand file tree Collapse file tree 1 file changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -87,20 +87,26 @@ impl CopyInterpreterV2 {
87
87
let stage_file = & stage_file[ 0 ] ;
88
88
89
89
if let Some ( file_info) = resp. file_info . get ( file) {
90
- // No need to copy the file again if etag is_some and match.
91
- if stage_file. etag . is_some ( ) && stage_file. etag == file_info. etag {
92
- tracing:: warn!( "ignore copy file {:?} matched by etag" , file) ;
93
- continue ;
94
- }
95
-
96
- if file_info. content_length == stage_file. size
97
- && file_info. last_modified == Some ( stage_file. last_modified )
98
- {
99
- tracing:: warn!(
100
- "ignore copy file {:?} matched by content_length and last_modified" ,
101
- file
102
- ) ;
103
- continue ;
90
+ match & file_info. etag {
91
+ Some ( _etag) => {
92
+ // No need to copy the file again if etag is_some and match.
93
+ if stage_file. etag == file_info. etag {
94
+ tracing:: warn!( "ignore copy file {:?} matched by etag" , file) ;
95
+ continue ;
96
+ }
97
+ }
98
+ None => {
99
+ // etag is none, compare with content_length and last_modified.
100
+ if file_info. content_length == stage_file. size
101
+ && file_info. last_modified == Some ( stage_file. last_modified )
102
+ {
103
+ tracing:: warn!(
104
+ "ignore copy file {:?} matched by content_length and last_modified" ,
105
+ file
106
+ ) ;
107
+ continue ;
108
+ }
109
+ }
104
110
}
105
111
}
106
112
You can’t perform that action at this time.
0 commit comments