Permalink
Browse files

Final tweaks to persistence

  • Loading branch information...
1 parent 4d02c23 commit 868ae49ff82180a89f158aa31d801d5ee576da94 @abdullin abdullin committed Feb 19, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 Source/Btw.Redis/RedisAppendOnlyStore.cs
@@ -47,14 +47,20 @@ public void Append(string streamName, byte[] data, long expectedStreamVersion =
redis.call('HSET', 'STORE',storeVersion+1,ARGV[1])
redis.call('RPUSH',KEYS[1],storeVersion+1)
+ -- TODO: remove this thing from the code!
+
return streamVersion+1
else
return redis.error_reply('Stream version invalid. Expected ' .. expected .. ' actual ' .. streamVersion)
end
", 1, Encoding.UTF8.GetBytes(streamName), data, Encoding.UTF8.GetBytes(expectedStreamVersion.ToString()));
+
+
// TODO: catch stream conflicts
-
+
+ // TODO: this is NOT the way to go in production
+ _client.Save();
}
public IEnumerable<StreamData> ReadRecords(string streamName, long afterVersion, int maxCount)

0 comments on commit 868ae49

Please sign in to comment.