added more yields to avoid slow tasks

This commit is contained in:
Evan Tschannen 2018-07-12 17:47:35 -07:00
parent d47aae27f3
commit 4fedd05506
2 changed files with 4 additions and 1 deletions

View File

@ -62,7 +62,7 @@ ServerKnobs::ServerKnobs(bool randomize, ClientKnobs* clientKnobs) {
init( PEEK_TRACKER_EXPIRATION_TIME, 600 ); if( randomize && BUGGIFY ) PEEK_TRACKER_EXPIRATION_TIME = g_random->coinflip() ? 0.1 : 60;
init( PARALLEL_GET_MORE_REQUESTS, 32 ); if( randomize && BUGGIFY ) PARALLEL_GET_MORE_REQUESTS = 2;
init( MAX_QUEUE_COMMIT_BYTES, 15e6 ); if( randomize && BUGGIFY ) MAX_QUEUE_COMMIT_BYTES = 5000;
init( VERSIONS_PER_BATCH, VERSIONS_PER_SECOND/10 ); if( randomize && BUGGIFY ) VERSIONS_PER_BATCH = std::max<int64_t>(1,VERSIONS_PER_SECOND/1000);
init( VERSIONS_PER_BATCH, VERSIONS_PER_SECOND/20 ); if( randomize && BUGGIFY ) VERSIONS_PER_BATCH = std::max<int64_t>(1,VERSIONS_PER_SECOND/1000);
// Data distribution queue
init( HEALTH_POLL_TIME, 1.0 );

View File

@ -988,6 +988,7 @@ ACTOR Future<Void> bufferedGetMore( ILogSystem::BufferedCursor* self, int taskID
loaders.push_back(bufferedGetMoreLoader(self, cursor, targetVersion, taskID));
}
Void _ = wait( waitForAll(loaders) );
Void _ = wait(yield());
if(self->collectTags) {
std::sort(self->messages.begin(), self->messages.end());
@ -1001,6 +1002,8 @@ ACTOR Future<Void> bufferedGetMore( ILogSystem::BufferedCursor* self, int taskID
if(self->collectTags) {
self->combineMessages();
}
Void _ = wait(yield());
return Void();
}