Found a small error in checking subscriptions

March 4th, 2008 | by bryan |

I found a small error in how subscriptions were checked for updates today. A list of subscriptions that required updating was selected from the database. Initially there was no sorting placed on this as it was assumed that all items would be checked. However, as the number of subscriptions has skyrocketed it has become necessary to chunk this selection with a large number of threads handling bits of each chunk. By not ordering the chunks that were selected it became apparent that the default sorting, by id, caused the lower id subscriptions to be checked more often. Simply sorting on when the subscription was last checked fixed this problem and leveled out the update frequency, problem solved.


Post a Comment