{"action":"created","issue":{"url":"https://api.github.com/repos/krasserm/akka-persistence-cassandra/issues/69","labels_url":"https://api.github.com/repos/krasserm/akka-persistence-cassandra/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/krasserm/akka-persistence-cassandra/issues/69/comments","events_url":"https://api.github.com/repos/krasserm/akka-persistence-cassandra/issues/69/events","html_url":"https://github.com/krasserm/akka-persistence-cassandra/pull/69","id":97518101,"number":69,"title":"Issue 48 atomic updates","user":{"login":"chbatey","id":1866779,"avatar_url":"https://avatars.githubusercontent.com/u/1866779?v=3","gravatar_id":"","url":"https://api.github.com/users/chbatey","html_url":"https://github.com/chbatey","followers_url":"https://api.github.com/users/chbatey/followers","following_url":"https://api.github.com/users/chbatey/following{/other_user}","gists_url":"https://api.github.com/users/chbatey/gists{/gist_id}","starred_url":"https://api.github.com/users/chbatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chbatey/subscriptions","organizations_url":"https://api.github.com/users/chbatey/orgs","repos_url":"https://api.github.com/users/chbatey/repos","events_url":"https://api.github.com/users/chbatey/events{/privacy}","received_events_url":"https://api.github.com/users/chbatey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2015-07-27T17:52:52Z","updated_at":"2015-08-22T17:50:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/krasserm/akka-persistence-cassandra/pulls/69","html_url":"https://github.com/krasserm/akka-persistence-cassandra/pull/69","diff_url":"https://github.com/krasserm/akka-persistence-cassandra/pull/69.diff","patch_url":"https://github.com/krasserm/akka-persistence-cassandra/pull/69.patch"},"body":"Hi @krasserm - this will needs some clean up I just wanted some feedback / early discussions on the schema changes. I'll remove all the logging I was just 100% checking that I understood how/when akka-persistence called into the plugin.\r\n\r\nI removed marker and added a static boolean column called inUse. This will be set on any write and when we skip an entire partition due to a large persistAll. This is used for scans (like the marker used to be) to make sure we keep scanning if entire partitions have been deleted or skipped.\r\n\r\nI removed COMPACT STORAGE as this will limit our future schema changes and the space issue is being addressed in the next version of Cassandra (https://issues.apache.org/jira/browse/CASSANDRA-8099). \r\n\r\nFor atomicity I went with a similar approach to discussed on the issue:\r\n1) If an AtomicWrite spans a partition it is put in the higher partition\r\n2) Fail fast if someone tries to persist an atomic event that spans 3 partitions. Knowing a sequence number can only be in one partition greater than it should be makes finding easier. I'll be impressed if someone tries to persist an AtomicWrite that is 5-10M in size :)\r\n\r\nSo the trade off is that we may end up with slightly varied partition sizes but I don't see that as an issue and will only be noticeable if people have huge AtomicWrites. \r\n\r\nTODO:\r\n- Handle deletes for seqNr that got moved to the next partition. We'll either need to read then write to see where it is or delete both possible locations WDYT? I generally try and avoid read and writes due to the race conditions and bad perf due to round trips but the double delete adds unnecessary tombstones. \r\n\r\nCouple other things:\r\n- Changes the tests to use UUIDs as persistenceIds as I kept adding tests in the middle :)"},"comment":{"url":"https://api.github.com/repos/krasserm/akka-persistence-cassandra/issues/comments/133732755","html_url":"https://github.com/krasserm/akka-persistence-cassandra/pull/69#issuecomment-133732755","issue_url":"https://api.github.com/repos/krasserm/akka-persistence-cassandra/issues/69","id":133732755,"user":{"login":"chbatey","id":1866779,"avatar_url":"https://avatars.githubusercontent.com/u/1866779?v=3","gravatar_id":"","url":"https://api.github.com/users/chbatey","html_url":"https://github.com/chbatey","followers_url":"https://api.github.com/users/chbatey/followers","following_url":"https://api.github.com/users/chbatey/following{/other_user}","gists_url":"https://api.github.com/users/chbatey/gists{/gist_id}","starred_url":"https://api.github.com/users/chbatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chbatey/subscriptions","organizations_url":"https://api.github.com/users/chbatey/orgs","repos_url":"https://api.github.com/users/chbatey/repos","events_url":"https://api.github.com/users/chbatey/events{/privacy}","received_events_url":"https://api.github.com/users/chbatey/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T17:50:12Z","updated_at":"2015-08-22T17:50:12Z","body":"agreed @matlockx "}}