[Bps-public-commit] r15652 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Fri Aug 29 16:36:24 EDT 2008


Author: sartak
Date: Fri Aug 29 16:36:24 2008
New Revision: 15652

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/ForeignReplica.pm

Log:
 r70708 at onn:  sartak | 2008-08-29 16:36:04 -0400
 Override has_seen_changeset in ForeignReplica to just ask the host replica whether it has sent us this changeset or not


Modified: Prophet/trunk/lib/Prophet/ForeignReplica.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/ForeignReplica.pm	(original)
+++ Prophet/trunk/lib/Prophet/ForeignReplica.pm	Fri Aug 29 16:36:24 2008
@@ -89,6 +89,23 @@
         'prophet-uuid' )->(@_);
 }
 
+=head2 has_seen_changeset ChangeSet
+
+This is a simplification of L<Prophet::Replica/has_seen_changeset>. Because
+only a single Prophet replica is talking to this foreign replica, we only need
+to care about whether that replica (not the original replica) has given us the
+changeset.
+
+=cut
+
+sub has_seen_changeset {
+    my $self = shift;
+    my ($changeset) = validate_pos( @_, { isa => "Prophet::ChangeSet" } );
+
+    # Has our host replica given this changeset to us yet?
+    return $self->last_changeset_from_source($changeset->source_uuid) >= $changeset->sequence_no;
+}
+
 no Moose;
 __PACKAGE__->meta->make_immutable;
 



More information about the Bps-public-commit mailing list