{"action":"opened","issue":{"url":"https://api.github.com/repos/scylladb/scylla/issues/1774","repository_url":"https://api.github.com/repos/scylladb/scylla","labels_url":"https://api.github.com/repos/scylladb/scylla/issues/1774/labels{/name}","comments_url":"https://api.github.com/repos/scylladb/scylla/issues/1774/comments","events_url":"https://api.github.com/repos/scylladb/scylla/issues/1774/events","html_url":"https://github.com/scylladb/scylla/issues/1774","id":184441454,"number":1774,"title":"how to ensure the rp order when apply to memtable avoid 'replay_position_reordered_exception'","user":{"login":"duanshisan","id":16314600,"avatar_url":"https://avatars.githubusercontent.com/u/16314600?v=3","gravatar_id":"","url":"https://api.github.com/users/duanshisan","html_url":"https://github.com/duanshisan","followers_url":"https://api.github.com/users/duanshisan/followers","following_url":"https://api.github.com/users/duanshisan/following{/other_user}","gists_url":"https://api.github.com/users/duanshisan/gists{/gist_id}","starred_url":"https://api.github.com/users/duanshisan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duanshisan/subscriptions","organizations_url":"https://api.github.com/users/duanshisan/orgs","repos_url":"https://api.github.com/users/duanshisan/repos","events_url":"https://api.github.com/users/duanshisan/events{/privacy}","received_events_url":"https://api.github.com/users/duanshisan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-21T09:35:17Z","updated_at":"2016-10-21T09:35:17Z","closed_at":null,"body":"when the config commitlog_sync be set to batch, the commitlog will use the 'flush_queue'  by the function run_with_ordered_post_op(...) mode,  if this time there are three write oprations enter the queue, and they have ordered rp (generated in the allocate(..) function in the file commitlog.cc), assuming they are rp1, rp2, rp3 small to large,  rp1 will do flush write to the file , rp2 and rp3 will wait the rp1 complete,  then  will apply data to memtable with rp, but how to ensure the rp1,rp2,rp3 oprations in ordered be performed in the funcition column_family::apply(...) in the code file database.cc, because the check_valid_rp(...) function will check the rp order, otherwise will throw replay_position_reordered_exception().\r\n\r\nthanks"}}
{"actor":{"display_login":"duanshisan"}}