@@ -62,6 +62,7 @@ extern bool gIsNatSupported;
62
62
#define SAIREDIS_RECORD_ENABLE 0x1
63
63
#define SWSS_RECORD_ENABLE (0x1 << 1 )
64
64
#define RESPONSE_PUBLISHER_RECORD_ENABLE (0x1 << 2 )
65
+ #define RETRY_RECORD_ENABLE (0x1 << 3 )
65
66
66
67
/* orchagent heart beat message interval */
67
68
#define HEART_BEAT_INTERVAL_MSECS_DEFAULT 10 * 1000
@@ -109,6 +110,7 @@ void sighup_handler(int signo)
109
110
/*
110
111
* Don't do any logging since they are using mutexes.
111
112
*/
113
+ Recorder::Instance ().retry .setRotate (true );
112
114
Recorder::Instance ().swss .setRotate (true );
113
115
Recorder::Instance ().sairedis .setRotate (true );
114
116
Recorder::Instance ().respub .setRotate (true );
@@ -361,6 +363,7 @@ int main(int argc, char **argv)
361
363
string record_location = Recorder::DEFAULT_DIR;
362
364
string swss_rec_filename = Recorder::SWSS_FNAME;
363
365
string sairedis_rec_filename = Recorder::SAIREDIS_FNAME;
366
+ string retry_rec_filename = Recorder::RETRY_FNAME;
364
367
string zmq_server_address = " tcp://127.0.0.1:" + to_string (ORCH_ZMQ_PORT);
365
368
string vrf;
366
369
bool enable_zmq = false ;
@@ -395,7 +398,7 @@ int main(int argc, char **argv)
395
398
// Disable all recordings if atoi() fails i.e. returns 0 due to
396
399
// invalid command line argument.
397
400
record_type = atoi (optarg);
398
- if (record_type < 0 || record_type > 7 )
401
+ if (record_type < 0 || record_type > 15 )
399
402
{
400
403
usage ();
401
404
exit (EXIT_FAILURE);
@@ -522,6 +525,13 @@ int main(int argc, char **argv)
522
525
Recorder::Instance ().respub .setFileName (responsepublisher_rec_filename);
523
526
Recorder::Instance ().respub .startRec (false );
524
527
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
+
525
535
// Instantiate database connectors
526
536
DBConnector appl_db (" APPL_DB" , 0 );
527
537
DBConnector config_db (" CONFIG_DB" , 0 );
0 commit comments