Skip to content
This repository
Browse code

Fix accidental regression in KVS test.

Whoops: the previous coding looked "obviously" wrong, but I forgot that symbols
get transmogrified into strings when they pass through MsgPack. Switch to just
using strings consistently.
  • Loading branch information...
commit f53fd535f241ddd5cf90dd80b8ef6873d1162d94 1 parent e4c38b9
Neil Conway authored September 16, 2012

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  kvs/kvs.rb
12  kvs/kvs.rb
@@ -82,19 +82,19 @@ module ReplicatedKVS
82 82
     # if I am the master, multicast store requests
83 83
     mcast_send <= kvput do |k|
84 84
       unless member.include? [k.client]
85  
-        [k.reqid, [:put, [@addy, k.key, k.reqid, k.value]]]
  85
+        [k.reqid, ["put", [@addy, k.key, k.reqid, k.value]]]
86 86
       end
87 87
     end
88 88
 
89 89
     kvs.kvput <= mcast_done do |m|
90  
-      if m.payload[0] == :put
  90
+      if m.payload[0] == "put"
91 91
         m.payload[1]
92 92
       end
93 93
     end
94 94
 
95 95
     # if I am a replica, store the payload of the multicast
96 96
     kvs.kvput <= pipe_out do |d|
97  
-      if d.payload.fetch(1) != @addy and d.payload[0] == :put
  97
+      if d.payload.fetch(1) != @addy and d.payload[0] == "put"
98 98
         d.payload[1]
99 99
       end
100 100
    end
@@ -103,18 +103,18 @@ module ReplicatedKVS
103 103
   bloom :dels do
104 104
     mcast_send <= kvdel do |k|
105 105
       unless member.include? [k.client]
106  
-        [k.reqid, [:del, [@addy, k.key, k.reqid]]]
  106
+        [k.reqid, ["del", [@addy, k.key, k.reqid]]]
107 107
       end
108 108
     end
109 109
 
110 110
     kvs.kvdel <= mcast_done do |m|
111  
-      if m.payload[0] == :del
  111
+      if m.payload[0] == "del"
112 112
         m.payload[1]
113 113
       end
114 114
     end
115 115
 
116 116
     kvs.kvdel <= pipe_out do |d|
117  
-      if d.payload.fetch(1) != @addy and d.payload[0] == :del
  117
+      if d.payload.fetch(1) != @addy and d.payload[0] == "del"
118 118
         d.payload[1]
119 119
       end
120 120
     end

0 notes on commit f53fd53

Please sign in to comment.
Something went wrong with that request. Please try again.