Changeset 24547 for trunk/Nebulous-Server
- Timestamp:
- Jun 25, 2009, 11:21:45 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous-Server/lib/Nebulous/Server.pm (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/lib/Nebulous/Server.pm
r24542 r24547 31 31 __PACKAGE__->mk_accessors(qw( log sql config cache )); 32 32 33 use constant SUBPATH_DEPTH => 2; 34 use constant NFS_RETRIES => 100; 33 use constant SUBPATH_DEPTH => 2; 34 use constant NFS_RETRIES => 100; 35 use constant NFS_RETRY_WAIT => 1; 36 use constant TRANS_RETRY_WAIT => 1; 35 37 36 38 # transaction restart/retry regex … … 168 170 if ($@ =~ qr/Can't connect to MySQL server/) { 169 171 $log->warn("database error, retrying transaction: $@"); 170 sleep 1;172 sleep TRANS_RETRY_WAIT; 171 173 redo TRANS; 172 174 } … … 330 332 if ($@ =~ $trans_regex) { 331 333 $log->warn("database error, retrying transaction: $@"); 334 sleep TRANS_RETRY_WAIT; 332 335 redo TRANS; 333 336 } … … 456 459 $log->warn("database error, retrying transaction: $@"); 457 460 $parent_id = 1; 461 sleep TRANS_RETRY_WAIT; 458 462 redo TRANS; 459 463 } … … 461 465 $log->warn("Duplicate database entry, retrying transaction: $@"); 462 466 $parent_id = 1; 467 sleep TRANS_RETRY_WAIT; 463 468 redo TRANS; 464 469 } … … 541 546 if ($@ =~ $trans_regex) { 542 547 $log->warn("database error, retrying transaction: $@"); 548 sleep TRANS_RETRY_WAIT; 543 549 redo TRANS; 544 550 } … … 655 661 if ($@ =~ $trans_regex) { 656 662 $log->warn("database error, retrying transaction: $@"); 663 sleep TRANS_RETRY_WAIT; 657 664 redo TRANS; 658 665 } … … 810 817 if ($@ =~ $trans_regex) { 811 818 $log->warn("database error, retrying transaction: $@"); 819 sleep TRANS_RETRY_WAIT; 812 820 redo TRANS; 813 821 } … … 937 945 if ($@ =~ $trans_regex) { 938 946 $log->warn("database error, retrying transaction: $@"); 947 sleep TRANS_RETRY_WAIT; 939 948 redo TRANS; 940 949 } … … 1054 1063 if ($@ =~ $trans_regex) { 1055 1064 $log->warn("database error, retrying transaction: $@"); 1065 sleep TRANS_RETRY_WAIT; 1056 1066 redo TRANS; 1057 1067 } … … 1145 1155 if ($@ =~ $trans_regex) { 1146 1156 $log->warn("database error, retrying transaction: $@"); 1157 sleep TRANS_RETRY_WAIT; 1147 1158 redo TRANS; 1148 1159 } … … 1330 1341 if ($@ =~ $trans_regex) { 1331 1342 $log->warn("database error, retrying transaction: $@"); 1343 sleep TRANS_RETRY_WAIT; 1332 1344 redo TRANS; 1333 1345 } … … 1658 1670 if ($@ =~ $trans_regex) { 1659 1671 $log->warn("database error, retrying transaction: $@"); 1672 sleep TRANS_RETRY_WAIT; 1660 1673 redo TRANS; 1661 1674 } … … 2186 2199 if ($@) { 2187 2200 $log->logdie($@); 2188 sleep 1;2201 sleep NFS_RETRY_WAIT; 2189 2202 next; 2190 2203 }
Note:
See TracChangeset
for help on using the changeset viewer.
