Commit b30f3649 authored by Jim Fulton's avatar Jim Fulton

Explain some puzzling code :)

parent 54808e01
...@@ -920,6 +920,12 @@ class StorageServer: ...@@ -920,6 +920,12 @@ class StorageServer:
def _setup_invq(self, name, storage): def _setup_invq(self, name, storage):
lastInvalidations = getattr(storage, 'lastInvalidations', None) lastInvalidations = getattr(storage, 'lastInvalidations', None)
if lastInvalidations is None: if lastInvalidations is None:
# Using None below doesn't look right, but the first
# element in invq is never used. See get_invalidations.
# (If it was used, it would generate an error, which would
# be good. :) Doing this allows clients that were up to
# date when a server was restarted to pick up transactions
# it subsequently missed.
self.invq[name] = [(storage.lastTransaction(), None)] self.invq[name] = [(storage.lastTransaction(), None)]
else: else:
self.invq[name] = list( self.invq[name] = list(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment