Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Support for incr/decr operations #1

wants to merge 69 commits into


None yet
1 participant

Please consider merging this branch. Basically added support for incr/decr operations.

Joe Williams and others added some commits Mar 19, 2010

Joe Williams added another merle project to the readme. 9e739f3
joewilliams gen_server2 upgrade 8742789
joewilliams Merge branch 'master' of github.com:joewilliams/merle 3294247
joewilliams added priority queue for gen_server2 9e60987
joewilliams s/get/getkey in t02 ab4bccc
joewilliams better disconnect procedure, thanks zabrane 1fc2c4f
joewilliams disconnect should be a cast not call 60b4251
Jeremy added incr/2, decr/2, addcounter/1, literal/1
incr/2 implements the increment command for memcached, decr implements
the decrement command.

addcounter/1 uses a simple (non-CAS) set to initialized a counter set
at zero, which can then be fiddled with via incr/2 and decr/2. This
was necessary because merle functions mainly as a key/value store for
arbitrary erlang data instead of a general data-store, such as we want
for cacti purposes.

literal/1 allows the user to submit literal strings over the socket to
memcached. This should be used with extreme caution as memcached is
intolerant of malformed input, but it is useful for determining what
strings sent to memcached should look like and checking assumptions
about its behavior.

TODO: (optional) need a Check-And-Set version of addcounter so that
distributed applications can update the same value with incr/2 and
decr/2. This would save client code from having to try changing a
value and then making a separate call to initialize it if it does not
Jeremy better addcounter/1, incr/2 and decr/2
All three of the above functions now return more erlang-ish results,
in keeping with the rest of merle. addcounter/1 also uses incr/2 to
determine if a prospective key exists before creating it. This should
be replaced with a CAS-version in the future.
Jeremy Wrapped merle:literal/1 in conditional compilation; documentation
merle:literal/1 is rough and possibly dangerous to leave in production
code (why would we let random erlang clients submit arbitrary strings
to memcached?), so it is now compiled only when the DEV flag is
defined to erlc.

Added EDoc segments for addcounter/1, incr/2 and decr/2 have been added
Jeremy README update
* added incr and decr to listed features

* added note to the effect that counters aren't erlang terms

* demonstration of incr, decr and addcounter

* examples of delete with counters and incr/decr on counters that
  don't exist
Jeremy Adding myself to contributer list in NOTICES 3c0798a
Jeremy Revert "Adding myself to contributer list in NOTICES"
This reverts commit 3c0798a.
Jeremy Revert "Revert "Adding myself to contributer list in NOTICES""
This reverts commit 00538e0.
Jeremy adding LICENSE.txt to the project
merle is distributed under the MIT license, but doesn't seem to have
copy of the text of the MIT license with the code. With the addition
of LICENCE.txt, that little wrinkle should be cleared up.
@jesse-lauro jesse-lauro Trying to rebarify merle 655f4c0
@jesse-lauro jesse-lauro Adding a more convenient set method that can skip the creation of arb…
…itrary flag
@jesse-lauro jesse-lauro Fixed stupid comp error miss 210caa0
@jesse-lauro jesse-lauro Adding ebin to .gitignore a18939f
@jesse-lauro jesse-lauro Made addcounter functionality work properly with target version of me…
@jesse-lauro jesse-lauro Added support for retrieving counter values, or indeed any value stor…
…e in purely list form
@jesse-lauro jesse-lauro Merged changes from pplov fork. Trying to get connection pooling and …
…clustering to play nice with added support for increment operations
@jesse-lauro jesse-lauro Debugged issues with merle incr/decr operation d216f70
@jesse-lauro jesse-lauro Added support for timeouts to be passed as an arg to the various merl…
…e functions
@jesse-lauro jesse-lauro A few changes to the merle parsing of a get response... have to suppo…
…rt more than just erlang binary term storage in order to support inc/dec operations
@jesse-lauro jesse-lauro Fixed issue with using merle with elasticache... have to trim values …
@jesse-lauro jesse-lauro Fixed a bug with socket timeouts e619039
@jesse-lauro jesse-lauro Added logging for better debugging of memcache errors 48fefff
@jesse-lauro jesse-lauro Fixed bug with merle timeouts. When these occur it's best to kill the…
… merle process and let the merle_watcher restart it via the supervisor.
@jesse-lauro jesse-lauro Ripped out extraneous loggging statement left over from debugging 6f58759
@jesse-lauro jesse-lauro Added a round_robin option for connection pooling 0fc016f
@jesse-lauro jesse-lauro Fixed dynamic merle compile 73950f4
@jesse-lauro jesse-lauro Ended race condition with local_pg2 init... debugged round_robin merl…
…e connection pooling
@jesse-lauro jesse-lauro Splitting writes from reads on ets tables within process group 26e8ad8
@jesse-lauro jesse-lauro Trying to lock individual merle conns when in use 9e96b68
@jesse-lauro jesse-lauro Small bug fix with how we retrieve pids 495d231
@jesse-lauro jesse-lauro Small bug fix with how we create use_count records 2ed5898
@jesse-lauro jesse-lauro It helps to actually export the function 114e463
@jesse-lauro jesse-lauro Modified strategy so that merle_watchers are managed by process group…
….. They manage rebooting failed processes internally so that we don't back the local_pg2's message queue
@jesse-lauro jesse-lauro Removed extraneous log message dd9e5bd
@jesse-lauro jesse-lauro Changed the way we release the merle connection slightly b6c2e95
@jesse-lauro jesse-lauro Reduced error logging to make less noisy 0be553f
@jesse-lauro jesse-lauro Changed exit scheme for merle processes.. should now issue exit messa…
…ge in queue, and move on
@jesse-lauro jesse-lauro Reduced error_logger logging when killing memcache connections a0435ab
@jesse-lauro jesse-lauro Simplified merle_cluster exec, complete with monitoring ccc51f8
@jesse-lauro jesse-lauro Fixed a bug with merle_watcher monitoring... fixed other shit ba88778
@jesse-lauro jesse-lauro Tweaked supervision tree for merle project, so that if process pool m…
…gr dies, all outstanding merle watchers will also die
@jesse-lauro jesse-lauro Adding timestamp that tracks time when connections unlock 1f7e194
@jesse-lauro jesse-lauro Added utility method for retrieving number of available merle connect…
…ions at any given time
@jesse-lauro jesse-lauro Debugged count_available utility method ebe815d
@jesse-lauro jesse-lauro Bug fix to monitoring call 1eae31a
@jesse-lauro jesse-lauro Adding periodic clean so that we never lose merle connections, even i…
…n the event of a bug
@jesse-lauro jesse-lauro Adding periodic clean so that we never lose merle connections, even i…
…n the event of a bug
@jesse-lauro jesse-lauro Added proper calculation of now to merle code f76ea9e
@jesse-lauro jesse-lauro One more time calc f382bbe
@jesse-lauro jesse-lauro Now properly cleaning against proper interval 7aec952
@jesse-lauro jesse-lauro Added threshold in RR index incrementing 9381814
@jesse-lauro jesse-lauro Shifting the round robin index to include threshold 0f01024
@jesse-lauro jesse-lauro Merge pull request #1 from jesse-ad/locked-pgs
Locked pgs
@jesse-lauro jesse-lauro Made some changes to the way join initializes state 29ebe6e
@jesse-lauro jesse-lauro Trying to fix merle initialization bugs 4cf1e33
@jesse-lauro jesse-lauro Removing overly verbose error logs from merle 07e19d7
@jesse-lauro jesse-lauro No longer greedily initializing all connections upon first start. Ins…
…tead we initialize on demand.
@jesse-lauro jesse-lauro Simplified connection pooling logic. Now use status is stored within …
…merle_client itself. merle_pool merely chooses a client, which is then checked out via the exec function
@jesse-lauro jesse-lauro Some bug fixes f5f6e11
@jesse-lauro jesse-lauro Returning result along with merle state upon call to merle:exec 2e7323f
@jesse-lauro jesse-lauro Fixed a merle code bug 29c93f7
@jesse-lauro jesse-lauro Merged old-connection-pooling branch. Now returning merle exec result…
… along with value
@jesse-lauro jesse-lauro Turned down log4erl logging on merle errors 592f5d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment