Moved the subscription and transport timestamps out of the contacts

table so it's not necessary to hold a write lock on the (heavily used)
contacts table to update them.
This commit is contained in:
akwizgran
2011-08-14 14:46:12 +02:00
parent 2c13e35dc4
commit 5e0aadd373
12 changed files with 122 additions and 63 deletions

View File

@@ -779,7 +779,7 @@ public abstract class DatabaseComponentTest extends TestCase {
oneOf(database).getVisibleSubscriptions(txn, contactId);
will(returnValue(Collections.singletonMap(group, 0L)));
// Add the subscriptions to the writer
oneOf(subscriptionWriter).writeSubscriptionUpdate(
oneOf(subscriptionWriter).writeSubscriptions(
with(Collections.singletonMap(group, 0L)),
with(any(long.class)));
}});
@@ -812,7 +812,7 @@ public abstract class DatabaseComponentTest extends TestCase {
oneOf(database).getTransports(txn);
will(returnValue(transports));
// Add the properties to the writer
oneOf(transportWriter).writeTransportUpdate(with(transports),
oneOf(transportWriter).writeTransports(with(transports),
with(any(long.class)));
}});
DatabaseComponent db = createDatabaseComponent(database, cleaner);