@@ -124,9 +124,10 @@ func registerOnlineRestorePerf(r registry.Registry) {
124
124
cloud : spec .GCE ,
125
125
fixture : SmallFixture ,
126
126
},
127
- fullBackupOnly : true ,
128
- timeout : 1 * time .Hour ,
129
- suites : registry .Suites (registry .Nightly ),
127
+ fullBackupOnly : true ,
128
+ skipFingerprint : true ,
129
+ timeout : 1 * time .Hour ,
130
+ suites : registry .Suites (registry .Nightly ),
130
131
},
131
132
workload : tpccRestore {
132
133
opts : tpccRunOpts {waitFraction : 0 , workers : 100 , maxRate : 300 },
@@ -163,9 +164,10 @@ func registerOnlineRestorePerf(r registry.Registry) {
163
164
cloud : spec .GCE ,
164
165
fixture : MediumFixture ,
165
166
},
166
- timeout : 3 * time .Hour ,
167
- suites : registry .Suites (registry .Nightly ),
168
- fullBackupOnly : true ,
167
+ timeout : 3 * time .Hour ,
168
+ suites : registry .Suites (registry .Nightly ),
169
+ fullBackupOnly : true ,
170
+ skipFingerprint : true ,
169
171
},
170
172
workload : tpccRestore {
171
173
opts : tpccRunOpts {waitFraction : 0 , workers : 100 , maxRate : 1000 },
@@ -182,9 +184,10 @@ func registerOnlineRestorePerf(r registry.Registry) {
182
184
cloud : spec .GCE ,
183
185
fixture : MediumFixture ,
184
186
},
185
- timeout : 3 * time .Hour ,
186
- suites : registry .Suites (registry .Nightly ),
187
- fullBackupOnly : true ,
187
+ timeout : 3 * time .Hour ,
188
+ suites : registry .Suites (registry .Nightly ),
189
+ fullBackupOnly : true ,
190
+ skipFingerprint : true ,
188
191
},
189
192
workload : tpccRestore {
190
193
opts : tpccRunOpts {waitFraction : 0 , workers : 100 , maxRate : 1000 },
@@ -202,9 +205,10 @@ func registerOnlineRestorePerf(r registry.Registry) {
202
205
cloud : spec .AWS ,
203
206
fixture : MediumFixture ,
204
207
},
205
- timeout : 3 * time .Hour ,
206
- suites : registry .Suites (registry .Nightly ),
207
- fullBackupOnly : true ,
208
+ timeout : 3 * time .Hour ,
209
+ suites : registry .Suites (registry .Nightly ),
210
+ fullBackupOnly : true ,
211
+ skipFingerprint : true ,
208
212
},
209
213
workload : tpccRestore {
210
214
opts : tpccRunOpts {waitFraction : 0 , workers : 100 , maxRate : 1000 },
@@ -217,10 +221,6 @@ func registerOnlineRestorePerf(r registry.Registry) {
217
221
for _ , runOnline := range []bool {true , false } {
218
222
for _ , useWorkarounds := range []bool {true , false } {
219
223
for _ , runWorkload := range []bool {true , false } {
220
- sp := sp
221
- runOnline := runOnline
222
- runWorkload := runWorkload
223
- useWorkarounds := useWorkarounds
224
224
clusterSettings := []string {
225
225
// TODO(dt): what's the right value for this? How do we tune this
226
226
// on the fly automatically during the restore instead of by-hand?
@@ -248,7 +248,7 @@ func registerOnlineRestorePerf(r registry.Registry) {
248
248
sp .namePrefix = "offline/"
249
249
sp .skip = "used for ad hoc experiments"
250
250
}
251
- if ! runWorkload {
251
+ if ! runWorkload && sp . skipFingerprint {
252
252
sp .skip = "used for ad hoc experiments"
253
253
}
254
254
@@ -276,6 +276,11 @@ func registerOnlineRestorePerf(r registry.Registry) {
276
276
sp .skip = "online restore is only tested on development branch"
277
277
}
278
278
279
+ // For the sake of simplicity, we only fingerprint when no active
280
+ // workload is running during the download phase so that we do not
281
+ // need to account for changes to the database after the restore.
282
+ doFingerprint := ! sp .skipFingerprint && runOnline && ! runWorkload
283
+
279
284
sp .initTestName ()
280
285
r .Add (registry.TestSpec {
281
286
Name : sp .testName ,
@@ -299,6 +304,9 @@ func registerOnlineRestorePerf(r registry.Registry) {
299
304
restoreStats := runRestore (
300
305
ctx , t , c , sp , rd , runOnline , runWorkload , clusterSettings ... ,
301
306
)
307
+ if doFingerprint {
308
+ rd .maybeValidateFingerprint (ctx )
309
+ }
302
310
if runOnline {
303
311
require .NoError (t , postRestoreValidation (
304
312
ctx ,
@@ -731,11 +739,10 @@ func executeTestRestorePhase(
731
739
}
732
740
restoreStartTime := timeutil .Now ()
733
741
restoreCmd := rd .restoreCmd (ctx , fmt .Sprintf ("DATABASE %s" , sp .backup .fixture .DatabaseName ()), opts )
734
- t .L ().Printf ("Running %s" , restoreCmd )
735
742
if _ , err = db .ExecContext (ctx , restoreCmd ); err != nil {
736
743
return time.Time {}, time.Time {}, err
737
744
}
738
- restoreEndTime := time .Now ()
745
+ restoreEndTime := timeutil .Now ()
739
746
if runOnline && sp .linkPhaseTimeout != 0 && sp .linkPhaseTimeout < restoreEndTime .Sub (restoreStartTime ) {
740
747
return restoreStartTime , restoreEndTime , errors .Newf (
741
748
"link phase took too long: %s greater than timeout %s" ,
0 commit comments