@@ -42,6 +42,9 @@ Status ExternalSstFileIngestionJob::Prepare(
42
42
status =
43
43
GetIngestedFileInfo (file_path, next_file_number++, &file_to_ingest, sv);
44
44
if (!status.ok ()) {
45
+ ROCKS_LOG_WARN (db_options_.info_log ,
46
+ " Failed to get ingested file info: %s: %s" ,
47
+ file_path.c_str (), status.ToString ().c_str ());
45
48
return status;
46
49
}
47
50
@@ -189,6 +192,10 @@ Status ExternalSstFileIngestionJob::Prepare(
189
192
ROCKS_LOG_INFO (db_options_.info_log ,
190
193
" Tried to link file %s but it's not supported : %s" ,
191
194
path_outside_db.c_str (), status.ToString ().c_str ());
195
+ } else {
196
+ ROCKS_LOG_WARN (db_options_.info_log , " Failed to link file %s to %s: %s" ,
197
+ path_outside_db.c_str (), path_inside_db.c_str (),
198
+ status.ToString ().c_str ());
192
199
}
193
200
} else {
194
201
f.copy_file = true ;
@@ -213,6 +220,12 @@ Status ExternalSstFileIngestionJob::Prepare(
213
220
io_tracer_);
214
221
// The destination of the copy will be ingested
215
222
f.file_temperature = dst_temp;
223
+
224
+ if (!status.ok ()) {
225
+ ROCKS_LOG_WARN (db_options_.info_log , " Failed to copy file %s to %s: %s" ,
226
+ path_outside_db.c_str (), path_inside_db.c_str (),
227
+ status.ToString ().c_str ());
228
+ }
216
229
} else {
217
230
// Note: we currently assume that linking files does not cross
218
231
// temperatures, so no need to change f.file_temperature
@@ -438,6 +451,11 @@ Status ExternalSstFileIngestionJob::NeedsFlush(bool* flush_needed,
438
451
}
439
452
status = cfd_->RangesOverlapWithMemtables (
440
453
ranges, super_version, db_options_.allow_data_in_errors , flush_needed);
454
+ if (!status.ok ()) {
455
+ ROCKS_LOG_WARN (db_options_.info_log ,
456
+ " Failed to check ranges overlap with memtables: %s" ,
457
+ status.ToString ().c_str ());
458
+ }
441
459
}
442
460
if (status.ok () && *flush_needed) {
443
461
if (!ingestion_options_.allow_blocking_flush ) {
@@ -472,6 +490,9 @@ Status ExternalSstFileIngestionJob::Run() {
472
490
bool need_flush = false ;
473
491
status = NeedsFlush (&need_flush, super_version);
474
492
if (!status.ok ()) {
493
+ ROCKS_LOG_WARN (db_options_.info_log ,
494
+ " Failed to check if flush is needed: %s" ,
495
+ status.ToString ().c_str ());
475
496
return status;
476
497
}
477
498
if (need_flush) {
@@ -543,6 +564,9 @@ Status ExternalSstFileIngestionJob::Run() {
543
564
&last_seqno, &batch_uppermost_level,
544
565
prev_batch_uppermost_level);
545
566
if (!status.ok ()) {
567
+ ROCKS_LOG_WARN (db_options_.info_log ,
568
+ " Failed to assign levels for one batch: %s" ,
569
+ status.ToString ().c_str ());
546
570
return status;
547
571
}
548
572
@@ -585,6 +609,8 @@ Status ExternalSstFileIngestionJob::AssignLevelsForOneBatch(
585
609
&largest_parsed, false /* log_err_key */ );
586
610
}
587
611
if (!status.ok ()) {
612
+ ROCKS_LOG_WARN (db_options_.info_log , " Failed to parse internal key: %s" ,
613
+ status.ToString ().c_str ());
588
614
return status;
589
615
}
590
616
@@ -607,6 +633,10 @@ Status ExternalSstFileIngestionJob::AssignLevelsForOneBatch(
607
633
608
634
status = AssignGlobalSeqnoForIngestedFile (file, assigned_seqno);
609
635
if (!status.ok ()) {
636
+ ROCKS_LOG_WARN (
637
+ db_options_.info_log ,
638
+ " Failed to assign global sequence number for ingested file: %s" ,
639
+ status.ToString ().c_str ());
610
640
return status;
611
641
}
612
642
TEST_SYNC_POINT_CALLBACK (" ExternalSstFileIngestionJob::Run" ,
@@ -619,6 +649,9 @@ Status ExternalSstFileIngestionJob::AssignLevelsForOneBatch(
619
649
620
650
status = GenerateChecksumForIngestedFile (file);
621
651
if (!status.ok ()) {
652
+ ROCKS_LOG_WARN (db_options_.info_log ,
653
+ " Failed to generate checksum for ingested file: %s" ,
654
+ status.ToString ().c_str ());
622
655
return status;
623
656
}
624
657
@@ -844,6 +877,10 @@ Status ExternalSstFileIngestionJob::ResetTableReader(
844
877
Status status =
845
878
fs_->NewRandomAccessFile (external_file, fo, &sst_file, nullptr );
846
879
if (!status.ok ()) {
880
+ ROCKS_LOG_WARN (
881
+ db_options_.info_log ,
882
+ " Failed to create random access file for external file %s: %s" ,
883
+ external_file.c_str (), status.ToString ().c_str ());
847
884
return status;
848
885
}
849
886
Temperature updated_temp = sst_file->GetTemperature ();
@@ -966,6 +1003,10 @@ Status ExternalSstFileIngestionJob::SanityCheckTableProperties(
966
1003
// user_defined_timestamps_persisted flag for the file.
967
1004
file_to_ingest->user_defined_timestamps_persisted = false ;
968
1005
} else if (!s.ok ()) {
1006
+ ROCKS_LOG_WARN (
1007
+ db_options_.info_log ,
1008
+ " ValidateUserDefinedTimestampsOptions failed for external file %s: %s" ,
1009
+ external_file.c_str (), s.ToString ().c_str ());
969
1010
return s;
970
1011
}
971
1012
@@ -990,6 +1031,9 @@ Status ExternalSstFileIngestionJob::GetIngestedFileInfo(
990
1031
Status status = fs_->GetFileSize (external_file, IOOptions (),
991
1032
&file_to_ingest->file_size , nullptr );
992
1033
if (!status.ok ()) {
1034
+ ROCKS_LOG_WARN (db_options_.info_log ,
1035
+ " Failed to get file size for external file %s: %s" ,
1036
+ external_file.c_str (), status.ToString ().c_str ());
993
1037
return status;
994
1038
}
995
1039
@@ -1006,12 +1050,19 @@ Status ExternalSstFileIngestionJob::GetIngestedFileInfo(
1006
1050
/* user_defined_timestamps_persisted=*/ true , sv,
1007
1051
file_to_ingest, &table_reader);
1008
1052
if (!status.ok ()) {
1053
+ ROCKS_LOG_WARN (db_options_.info_log ,
1054
+ " Failed to reset table reader for external file %s: %s" ,
1055
+ external_file.c_str (), status.ToString ().c_str ());
1009
1056
return status;
1010
1057
}
1011
1058
1012
1059
status = SanityCheckTableProperties (external_file, new_file_number, sv,
1013
1060
file_to_ingest, &table_reader);
1014
1061
if (!status.ok ()) {
1062
+ ROCKS_LOG_WARN (
1063
+ db_options_.info_log ,
1064
+ " Failed to sanity check table properties for external file %s: %s" ,
1065
+ external_file.c_str (), status.ToString ().c_str ());
1015
1066
return status;
1016
1067
}
1017
1068
@@ -1025,6 +1076,10 @@ Status ExternalSstFileIngestionJob::GetIngestedFileInfo(
1025
1076
table_reader.get (), sv, file_to_ingest, allow_data_in_errors);
1026
1077
1027
1078
if (!seqno_status.ok ()) {
1079
+ ROCKS_LOG_WARN (
1080
+ db_options_.info_log ,
1081
+ " Failed to get sequence number boundary for external file %s: %s" ,
1082
+ external_file.c_str (), seqno_status.ToString ().c_str ());
1028
1083
return seqno_status;
1029
1084
}
1030
1085
assert (file_to_ingest->smallest_seqno <= file_to_ingest->largest_seqno );
@@ -1052,6 +1107,9 @@ Status ExternalSstFileIngestionJob::GetIngestedFileInfo(
1052
1107
status = table_reader->VerifyChecksum (
1053
1108
ro, TableReaderCaller::kExternalSSTIngestion );
1054
1109
if (!status.ok ()) {
1110
+ ROCKS_LOG_WARN (db_options_.info_log ,
1111
+ " Failed to verify checksum for table reader: %s" ,
1112
+ status.ToString ().c_str ());
1055
1113
return status;
1056
1114
}
1057
1115
}
@@ -1243,6 +1301,9 @@ Status ExternalSstFileIngestionJob::AssignLevelAndSeqnoForIngestedFile(
1243
1301
ro, env_options_, file_to_ingest->start_ukey ,
1244
1302
file_to_ingest->limit_ukey , lvl, &overlap_with_level);
1245
1303
if (!status.ok ()) {
1304
+ ROCKS_LOG_WARN (db_options_.info_log ,
1305
+ " Failed to check overlap with level iterator: %s" ,
1306
+ status.ToString ().c_str ());
1246
1307
return status;
1247
1308
}
1248
1309
if (overlap_with_level) {
@@ -1355,6 +1416,14 @@ Status ExternalSstFileIngestionJob::AssignGlobalSeqnoForIngestedFile(
1355
1416
PutFixed64 (&seqno_val, seqno);
1356
1417
status = fsptr->Write (file_to_ingest->global_seqno_offset , seqno_val,
1357
1418
IOOptions (), nullptr );
1419
+ if (!status.ok ()) {
1420
+ ROCKS_LOG_WARN (db_options_.info_log ,
1421
+ " Failed to write global seqno to %s: %s" ,
1422
+ file_to_ingest->internal_file_path .c_str (),
1423
+ status.ToString ().c_str ());
1424
+ return status;
1425
+ }
1426
+
1358
1427
if (status.ok ()) {
1359
1428
TEST_SYNC_POINT (" ExternalSstFileIngestionJob::BeforeSyncGlobalSeqno" );
1360
1429
status = SyncIngestedFile (fsptr.get ());
@@ -1371,6 +1440,11 @@ Status ExternalSstFileIngestionJob::AssignGlobalSeqnoForIngestedFile(
1371
1440
return status;
1372
1441
}
1373
1442
} else if (!status.IsNotSupported ()) {
1443
+ ROCKS_LOG_WARN (
1444
+ db_options_.info_log ,
1445
+ " Failed to open ingested file %s for random read/write: %s" ,
1446
+ file_to_ingest->internal_file_path .c_str (),
1447
+ status.ToString ().c_str ());
1374
1448
return status;
1375
1449
}
1376
1450
}
@@ -1403,6 +1477,9 @@ IOStatus ExternalSstFileIngestionJob::GenerateChecksumForIngestedFile(
1403
1477
db_options_.allow_mmap_reads , io_tracer_, db_options_.rate_limiter .get (),
1404
1478
ro, db_options_.stats , db_options_.clock );
1405
1479
if (!io_s.ok ()) {
1480
+ ROCKS_LOG_WARN (
1481
+ db_options_.info_log , " Failed to generate checksum for %s: %s" ,
1482
+ file_to_ingest->internal_file_path .c_str (), io_s.ToString ().c_str ());
1406
1483
return io_s;
1407
1484
}
1408
1485
file_to_ingest->file_checksum = std::move (file_checksum);
0 commit comments