Skip to content

Commit

Permalink
fix issue #94 cluster mode stuck (#106)
Browse files Browse the repository at this point in the history
add missing bufferevent_disable for connections that
complete to send new requests
  • Loading branch information
YaacovHazan authored and yaacovhazan-Redislabs committed Dec 11, 2019
1 parent dd582d2 commit bec9cc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shard_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,10 @@ void shard_connection::fill_pipeline(void)
}

// don't exceed requests
if (m_conns_manager->hold_pipeline(m_id))
if (m_conns_manager->hold_pipeline(m_id)) {
bufferevent_disable(m_bev, EV_WRITE|EV_READ);
break;
}

// client manage requests logic
m_conns_manager->create_request(now, m_id);
Expand Down

1 comment on commit bec9cc4

@speddam
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

The latest memtier_benchmark shows the 'All Stats' output containing all zeros for all the columns except 'Latency', like this:

$ ./memtier_benchmark --clients=50 --threads=4 --requests=10000 --data-size-range=32-1000 --pipeline=100 --ratio=5:5
...
ALL STATS
=========================================================================
Type         Ops/sec     Hits/sec   Misses/sec      Latency       KB/sec 
-------------------------------------------------------------------------
Sets            0.00          ---          ---     19.71200         0.00 
Gets            0.00         0.00         0.00     19.73500         0.00 
Waits           0.00          ---          ---      0.00000          --- 
Totals          0.00         0.00         0.00     19.72300         0.00
...

I have done the git bisect and it pointed to this commit:

$ git bisect bad
bec9cc46079476c8414ab7104516c5a9c966b90f is the first bad commit
commit bec9cc46079476c8414ab7104516c5a9c966b90f
Author: YaacovHazan <[email protected]>
Date:   Wed Dec 11 17:02:15 2019 +0200

    fix issue #94 cluster mode stuck (#106)

    add missing bufferevent_disable for connections that
    complete to send new requests

:100644 100644 b9fe31c3568e172369897c0eea0111138dcc5e8b 6fbcd856130c8709f8786c97e6b38ad101ca342c M	shard_connection.cpp

I'm not familiar with the code base, but by commenting out the bufferevent_disable() call, I see that the output now shows all the columns:

ALL STATS
=========================================================================
Type         Ops/sec     Hits/sec   Misses/sec      Latency       KB/sec 
-------------------------------------------------------------------------
Sets       509744.79          ---          ---     19.52900    281230.68 
Gets       509744.79       509.74    509235.05     19.53200     20145.57 
Waits           0.00          ---          ---      0.00000          --- 
Totals    1019489.58       509.74    509235.05     19.53000    301376.25

Regards,
Subhash

Please sign in to comment.