@@ -62,6 +62,7 @@ extern bool gIsNatSupported;
6262#define SAIREDIS_RECORD_ENABLE 0x1
6363#define SWSS_RECORD_ENABLE (0x1 << 1 )
6464#define RESPONSE_PUBLISHER_RECORD_ENABLE (0x1 << 2 )
65+ #define RETRY_RECORD_ENABLE (0x1 << 3 )
6566
6667/* orchagent heart beat message interval */
6768#define HEART_BEAT_INTERVAL_MSECS_DEFAULT 10 * 1000
@@ -109,6 +110,7 @@ void sighup_handler(int signo)
109110 /*
110111 * Don't do any logging since they are using mutexes.
111112 */
113+ Recorder::Instance ().retry .setRotate (true );
112114 Recorder::Instance ().swss .setRotate (true );
113115 Recorder::Instance ().sairedis .setRotate (true );
114116 Recorder::Instance ().respub .setRotate (true );
@@ -361,6 +363,7 @@ int main(int argc, char **argv)
361363 string record_location = Recorder::DEFAULT_DIR;
362364 string swss_rec_filename = Recorder::SWSS_FNAME;
363365 string sairedis_rec_filename = Recorder::SAIREDIS_FNAME;
366+ string retry_rec_filename = Recorder::RETRY_FNAME;
364367 string zmq_server_address = " tcp://127.0.0.1:" + to_string (ORCH_ZMQ_PORT);
365368 string vrf;
366369 bool enable_zmq = false ;
@@ -395,7 +398,7 @@ int main(int argc, char **argv)
395398 // Disable all recordings if atoi() fails i.e. returns 0 due to
396399 // invalid command line argument.
397400 record_type = atoi (optarg);
398- if (record_type < 0 || record_type > 7 )
401+ if (record_type < 0 || record_type > 15 )
399402 {
400403 usage ();
401404 exit (EXIT_FAILURE);
@@ -522,6 +525,13 @@ int main(int argc, char **argv)
522525 Recorder::Instance ().respub .setFileName (responsepublisher_rec_filename);
523526 Recorder::Instance ().respub .startRec (false );
524527
528+ Recorder::Instance ().retry .setRecord (
529+ (record_type & RETRY_RECORD_ENABLE) == RETRY_RECORD_ENABLE
530+ );
531+ Recorder::Instance ().retry .setLocation (record_location);
532+ Recorder::Instance ().retry .setFileName (retry_rec_filename);
533+ Recorder::Instance ().retry .startRec (true );
534+
525535 // Instantiate database connectors
526536 DBConnector appl_db (" APPL_DB" , 0 );
527537 DBConnector config_db (" CONFIG_DB" , 0 );
0 commit comments