Added savepoints to usage tracking to prevent occasional race conditions with upserts