diff mbox series

[ovs-dev] ovsdb-idl.c: Increase seqno for change-tracking of table references.

Message ID 1538766863-68790-1-git-send-email-hzhou8@ebay.com
State Accepted
Headers show
Series [ovs-dev] ovsdb-idl.c: Increase seqno for change-tracking of table references. | expand

Commit Message

Han Zhou Oct. 5, 2018, 7:14 p.m. UTC
From: Han Zhou <hzhou8@ebay.com>

This is an enhancement for commit:
102781c ovsdb-idl: Track changes for table references.

The seqno change is needed so that the change-tracking helper function
..._is_new() can work properly.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
---
 lib/ovsdb-idl.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Ben Pfaff Oct. 8, 2018, 3:42 p.m. UTC | #1
On Fri, Oct 05, 2018 at 12:14:23PM -0700, Han Zhou wrote:
> From: Han Zhou <hzhou8@ebay.com>
> 
> This is an enhancement for commit:
> 102781c ovsdb-idl: Track changes for table references.
> 
> The seqno change is needed so that the change-tracking helper function
> ..._is_new() can work properly.
> 
> Signed-off-by: Han Zhou <hzhou8@ebay.com>

Does this fix a bug?  It sounds like it, but the commit message
explicitly calls it an "enhancement".

Thanks,

Ben.
Han Zhou Oct. 8, 2018, 5:23 p.m. UTC | #2
On Mon, Oct 8, 2018 at 8:42 AM Ben Pfaff <blp@ovn.org> wrote:
>
> On Fri, Oct 05, 2018 at 12:14:23PM -0700, Han Zhou wrote:
> > From: Han Zhou <hzhou8@ebay.com>
> >
> > This is an enhancement for commit:
> > 102781c ovsdb-idl: Track changes for table references.
> >
> > The seqno change is needed so that the change-tracking helper function
> > ..._is_new() can work properly.
> >
> > Signed-off-by: Han Zhou <hzhou8@ebay.com>
>
> Does this fix a bug?  It sounds like it, but the commit message
> explicitly calls it an "enhancement".
>
> Thanks,
>
> Ben.

Without this change, the feature is incomplete, while we assumed it
complete. So it is exactly a bug fix.
s/enhancement/fix

Thanks,
Han
Ben Pfaff Oct. 8, 2018, 5:39 p.m. UTC | #3
On Mon, Oct 08, 2018 at 10:23:55AM -0700, Han Zhou wrote:
> On Mon, Oct 8, 2018 at 8:42 AM Ben Pfaff <blp@ovn.org> wrote:
> >
> > On Fri, Oct 05, 2018 at 12:14:23PM -0700, Han Zhou wrote:
> > > From: Han Zhou <hzhou8@ebay.com>
> > >
> > > This is an enhancement for commit:
> > > 102781c ovsdb-idl: Track changes for table references.
> > >
> > > The seqno change is needed so that the change-tracking helper function
> > > ..._is_new() can work properly.
> > >
> > > Signed-off-by: Han Zhou <hzhou8@ebay.com>
> >
> > Does this fix a bug?  It sounds like it, but the commit message
> > explicitly calls it an "enhancement".
> >
> > Thanks,
> >
> > Ben.
> 
> Without this change, the feature is incomplete, while we assumed it
> complete. So it is exactly a bug fix.
> s/enhancement/fix

Thanks for clarifying.  I updated the commit message and applied this to
master.
diff mbox series

Patch

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 6a19b07..9f44cef 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -2359,6 +2359,9 @@  add_tracked_change_for_references(struct ovsdb_idl_row *row)
             ovsdb_idl_track_is_set(row->table)) {
         ovs_list_push_back(&row->table->track_list,
                            &row->track_node);
+        row->change_seqno[OVSDB_IDL_CHANGE_MODIFY]
+            = row->table->change_seqno[OVSDB_IDL_CHANGE_MODIFY]
+            = row->table->db->change_seqno + 1;
 
         const struct ovsdb_idl_arc *arc;
         LIST_FOR_EACH (arc, dst_node, &row->dst_arcs) {