[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2019-01-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16731614#comment-16731614
 ] 

ASF GitHub Bot commented on OMID-90:


Github user yonigottesman closed the pull request at:

https://github.com/apache/incubator-omid/pull/46


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Fix For: 1.0.0
>
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-18 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16655320#comment-16655320
 ] 

James Taylor commented on OMID-90:
--

Everything is good with OMID-109. All the transaction tests pass. Last run the 
failure was a known flapper, unrelated to our work.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-18 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16655316#comment-16655316
 ] 

Yonatan Gottesman commented on OMID-90:
---

[~jamestaylor] Im not commiting yet because stuff looks like they still fail in 
OMID-109. lets stabilize that first

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-17 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654279#comment-16654279
 ] 

James Taylor commented on OMID-90:
--

{quote}Where would one go to edit stuff like the command used to compile and 
stuff like that?
{quote}
Good question. Unfortunately I don't know either. [~mujtabachohan] has always 
graciously made these changes. However, since our builds are working now, can't 
you just check-in something to Omid's phoenix-integration branch to make low 
latency the default and then kick off an omid2 Jenkins job? And then just 
revert it back.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-17 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654145#comment-16654145
 ] 

Yonatan Gottesman commented on OMID-90:
---

Hi, [~jamestaylor] I dont have any experience with editing jenkins jobs.

Where would one go to edit stuff like the command used to compile and stuff 
like that?

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-17 Thread Ohad Shacham (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654068#comment-16654068
 ] 

Ohad Shacham commented on OMID-90:
--

Awesome, Thx.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-17 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654065#comment-16654065
 ] 

James Taylor commented on OMID-90:
--

Yes, Yoni has the permissions he needs now to change the jenkins job. He could 
potentially change the default temporarily just to get a test run in.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-17 Thread Ohad Shacham (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654048#comment-16654048
 ] 

Ohad Shacham commented on OMID-90:
--

I assume that [~yonigo] can commit the low latency, we already reviewed 
everything. He wanted to wait until everything passes before he does the 
commit. 

The low latency is not default, [~jamestaylor] how can we change the 
configuration when running the jenkins? Do we have permissions to do some? 

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-17 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16653654#comment-16653654
 ] 

James Taylor commented on OMID-90:
--

Ok, sounds like we're good, then. Is it ok if [~yonigo] commits this now, 
[~ohads]? Would it be possible to get a Phoenix test run on the omid2 branch 
with the low latency version?

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-17 Thread Ohad Shacham (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16653340#comment-16653340
 ] 

Ohad Shacham commented on OMID-90:
--

{quote}In PHOENIX-4943, I write the shadow cells of the index rows when the 
index rows themselves are written. Does that solve the issue?
{quote}
 

Yes [~jamestaylor], the fence functionality exists in the transaction manager. 
The thing is that since during index population Phoenix writes that rows with 
the fence id, then before the fence id is not written to the commit table, we 
have to guarantee that the rows are written with the shadow cells. Otherwise, 
there might be a case that someone will try to read before the shadow cells 
exists. On a seconds thought, maybe it is not possible since the index is not 
valid yet? In any case, we want to do it since writing once is better than 
writing and then writing again the shadow cells. 

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-16 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16652959#comment-16652959
 ] 

Yonatan Gottesman commented on OMID-90:
---

Hi I dont want to mixup the low latency changes before all tests pass so we 
dont have trouble debugging.

when phoenix branch in stable and 109 runs without errors i will merge low 
latency after testing with phoenix.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-16 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16652519#comment-16652519
 ] 

James Taylor commented on OMID-90:
--

FYI, the test that inserts rows as the index is being initially populated is 
BaseIndexIT.testCreateIndexAfterUpsertStarted(). That'll be tested when 
GlobalMutableTxIndexIT is run. Would be good to try this with the low latency 
version of Omid. Even better would be to try a complete run with the low 
latency version.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-16 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16651850#comment-16651850
 ] 

James Taylor commented on OMID-90:
--

In PHOENIX-4943, I write the shadow cells of the index rows when the index rows 
themselves are written. Does that solve the issue? The fence was more to guard 
against the case in which a write to the data table occurs before we start 
maintaining the index. Prior to PHOENIX-4943, we were writing the shadow cells 
in the standard way (i.e. after the commit succeeded).

There's a test for this - would be good if you guys ran the Phoenix unit tests 
with the low latency version. I don't remember the particular test that tests 
writing to a table while the index is being created - [~tdsilva] - do you 
remember?

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-15 Thread Ohad Shacham (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16651230#comment-16651230
 ] 

Ohad Shacham commented on OMID-90:
--

[~jamestaylor], sorry for the late response.

In the low latency mode, the fence information is not written to the commit 
table and the fence id is only returned to the client. This is why using auto 
commit in this case is important. In -PHOENIX-4943-  you solved this issue, I 
just wanted to make sure it does. In the non low latency mode the fence info is 
written to the commit and can hide an incorrect auto commit (with runtime 
penalty of course :)).

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-15 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16650361#comment-16650361
 ] 

James Taylor commented on OMID-90:
--

Ping, [~ohads]. I didn't understand your question:
{quote}This commit removes the addition of the fence information to the commit 
table. Could you please check if it hurts correctness? It is related to the 
index population with auto commit that you have just added.
{quote}
We need the fence functionality in Phoenix so that when an index is created, we 
can guarantee that we don't miss creation of any data rows.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-11 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646680#comment-16646680
 ] 

James Taylor commented on OMID-90:
--

If you could please commit the smaller OMID-117 before this one to save any 
merge headaches, that be appreciated.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-11 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646643#comment-16646643
 ] 

James Taylor commented on OMID-90:
--

[~ohads] - which commit? I'm not sure what you're asking.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-11 Thread Ohad Shacham (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646350#comment-16646350
 ] 

Ohad Shacham commented on OMID-90:
--

[~jamestaylor], This commit removes the addition of the fence information to 
the commit table. Could you please check if it hurts correctness? It is related 
to the index population with auto commit that you have just added.

Thx!

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645330#comment-16645330
 ] 

ASF GitHub Bot commented on OMID-90:


Github user JamesRTaylor commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r224179421
  
--- Diff: 
hbase-client/src/test/java/org/apache/omid/transaction/TestOmidLLRaces.java ---
@@ -0,0 +1,243 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.omid.transaction;
+
+
+import static com.google.common.base.Charsets.UTF_8;
+import static 
org.apache.omid.committable.hbase.HBaseCommitTableConfig.DEFAULT_COMMIT_TABLE_CF_NAME;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.spy;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+
+import com.google.common.base.Optional;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Get;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.omid.committable.CommitTable;
+import org.apache.omid.committable.hbase.KeyGenerator;
+import org.apache.omid.committable.hbase.KeyGeneratorImplementations;
+import org.apache.omid.metrics.NullMetricsProvider;
+import org.apache.omid.tso.client.OmidClientConfiguration;
+import org.apache.omid.tso.client.TSOClient;
+import org.apache.omid.tso.client.TSOFuture;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+import org.testng.ITestContext;
+import org.testng.annotations.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+
+
+@Test(groups = "sharedHBase")
+public class TestOmidLLRaces extends OmidTestBase {
+
+private static final byte[] row1 = Bytes.toBytes("test-is-committed1");
+private static final byte[] row2 = Bytes.toBytes("test-is-committed2");
+private static final byte[] family = Bytes.toBytes(TEST_FAMILY);
+private static final byte[] qualifier = Bytes.toBytes("testdata");
+private static final byte[] data1 = Bytes.toBytes("testWrite-1");
+
+private static final Logger LOG = 
LoggerFactory.getLogger(TestOmidLLRaces.class);
+@Override
+protected boolean isLowLatency() {
+return true;
+}
+
+@Test(timeOut = 30_000)
+public void testIsCommitted(ITestContext context) throws Exception {
+AbstractTransactionManager tm = 
(AbstractTransactionManager)newTransactionManagerHBaseCommitTable(getClient(context));
+
+Table htable = connection.getTable(TableName.valueOf(TEST_TABLE));
+SnapshotFilterImpl snapshotFilter = new SnapshotFilterImpl(new 
HTableAccessWrapper(htable, htable),
+tm.getCommitTableClient());
+TTable table = spy(new TTable(htable, snapshotFilter, false));
+
+HBaseTransaction t1 = (HBaseTransaction) tm.begin();
+
+Put put = new Put(row1);
+put.addColumn(family, qualifier, data1);
+table.put(t1, put);
+tm.commit(t1);
+
+HBaseTransaction t2 = (HBaseTransaction) tm.begin();
+put = new Put(row2);
+put.addColumn(family, qualifier, data1);
+table.put(t2, put);
+table.flushCommits();
+
+HBaseTransaction t3 = (HBaseTransaction) tm.begin();
+put = new Put(row2);
+put.addColumn(family, qualifier, data1);
+table.put(t3, put);
+tm.commit(t3);
+
+HBaseCellId hBaseCellId1 = new HBaseCellId(table, row1, family, 
qual

[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644682#comment-16644682
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r223989230
  
--- Diff: 
transaction-client/src/main/java/org/apache/omid/transaction/AbstractTransactionManager.java
 ---
@@ -350,6 +356,43 @@ private void 
markReadOnlyTransaction(AbstractTransaction readO
 
 }
 
+private void commitLowLatencyTransaction(AbstractTransaction tx)
+throws RollbackException, TransactionException {
+try {
+
+long commitTs = tsoClient.commit(tx.getStartTimestamp(), 
tx.getWriteSet(), tx.getConflictFreeWriteSet()).get();
+boolean committed = 
commitTableWriter.atomicAddCommittedTransaction(tx.getStartTimestamp(),commitTs);
+if (!committed) {
+// Transaction has been invalidated by other client
+rollback(tx);
+
commitTableClient.completeTransaction(tx.getStartTimestamp());
+rolledbackTxsCounter.inc();
+throw new RollbackException("Transaction " + 
tx.getTransactionId() + " got invalidated");
+}
+certifyCommitForTx(tx, commitTs);
+updateShadowCellsAndRemoveCommitTableEntry(tx, postCommitter);
+
+} catch (ExecutionException e) {
+if (e.getCause() instanceof AbortException) { // TSO reports 
Tx conflicts as AbortExceptions in the future
+rollback(tx);
+rolledbackTxsCounter.inc();
+throw new RollbackException("Conflicts detected in tx 
writeset", e.getCause());
+}
+
+if (e.getCause() instanceof ServiceUnavailableException || 
e.getCause() instanceof ConnectionException) {
+errorTxsCounter.inc();
+rollback(tx); // Rollback proactively cause it's likely 
that a new TSOServer is now master
--- End diff --

the leader


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644680#comment-16644680
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r223976065
  
--- Diff: 
hbase-client/src/test/java/org/apache/omid/transaction/TestEndToEndScenariosWithHA.java
 ---
@@ -287,7 +287,7 @@ public void testScenario1() throws Exception {
 // TX 2 modifies cells R1C1 & R2C2 (v2)
 // TX 2 commits
 // End of Test state: R1C1 & R2C2 (v2)
-@Test(timeOut = 60_000)
+@Test(timeOut = 60_00)
--- End diff --

Why this is needed? Due to the low_cpu mode? or you just forgot it? :)


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644676#comment-16644676
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r223975170
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -181,22 +179,44 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 
 // 2) Then check the commit table
 // If the data was written at a previous epoch, check whether 
the transaction was invalidated
-Optional commitTimeStamp = 
commitTableClient.getCommitTimestamp(cellStartTimestamp).get();
-if (commitTimeStamp.isPresent()) {
-return commitTimeStamp.get();
+boolean invalidatedByOther = false;
+Optional commitTimestampFromCT = 
commitTableClient.getCommitTimestamp(cellStartTimestamp).get();
+if (commitTimestampFromCT.isPresent()) {
+if (isLowLatency && !commitTimestampFromCT.get().isValid())
+invalidatedByOther = true;
+else
+return commitTimestampFromCT.get();
 }
 
 // 3) Read from shadow cell
-commitTimeStamp = 
readCommitTimestampFromShadowCell(cellStartTimestamp, locator);
+Optional commitTimeStamp = 
readCommitTimestampFromShadowCell(cellStartTimestamp, locator);
 if (commitTimeStamp.isPresent()) {
 return commitTimeStamp.get();
 }
 
+// In case of LL, if found invalid ct cell, still must check 
sc in stage 3 then return
+if (invalidatedByOther) {
+assert(!commitTimestampFromCT.get().isValid());
+return commitTimestampFromCT.get();
+}
+
 // 4) Check the epoch and invalidate the entry
 // if the data was written by a transaction from a previous 
epoch (previous TSO)
-if (cellStartTimestamp < epoch) {
+if (cellStartTimestamp < epoch || isLowLatency) {
 boolean invalidated = 
commitTableClient.tryInvalidateTransaction(cellStartTimestamp).get();
 if (invalidated) { // Invalid commit timestamp
+
+// If we are running lowLatency Omid, we could have 
manged to invalidate a ct entry,
+// but the committing client already wrote to shadow 
cells:
--- End diff --

This can happen only in low latency mode, since in the regular mode the 
client keeps the commit table entry if persisting the commit was done after the 
tso lost its lease.


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 

[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644678#comment-16644678
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r223974621
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -181,22 +179,44 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 
 // 2) Then check the commit table
 // If the data was written at a previous epoch, check whether 
the transaction was invalidated
-Optional commitTimeStamp = 
commitTableClient.getCommitTimestamp(cellStartTimestamp).get();
-if (commitTimeStamp.isPresent()) {
-return commitTimeStamp.get();
+boolean invalidatedByOther = false;
+Optional commitTimestampFromCT = 
commitTableClient.getCommitTimestamp(cellStartTimestamp).get();
+if (commitTimestampFromCT.isPresent()) {
+if (isLowLatency && !commitTimestampFromCT.get().isValid())
+invalidatedByOther = true;
+else
+return commitTimestampFromCT.get();
 }
 
 // 3) Read from shadow cell
-commitTimeStamp = 
readCommitTimestampFromShadowCell(cellStartTimestamp, locator);
+Optional commitTimeStamp = 
readCommitTimestampFromShadowCell(cellStartTimestamp, locator);
 if (commitTimeStamp.isPresent()) {
 return commitTimeStamp.get();
 }
 
+// In case of LL, if found invalid ct cell, still must check 
sc in stage 3 then return
+if (invalidatedByOther) {
+assert(!commitTimestampFromCT.get().isValid());
+return commitTimestampFromCT.get();
+}
+
 // 4) Check the epoch and invalidate the entry
 // if the data was written by a transaction from a previous 
epoch (previous TSO)
-if (cellStartTimestamp < epoch) {
+if (cellStartTimestamp < epoch || isLowLatency) {
 boolean invalidated = 
commitTableClient.tryInvalidateTransaction(cellStartTimestamp).get();
 if (invalidated) { // Invalid commit timestamp
+
+// If we are running lowLatency Omid, we could have 
manged to invalidate a ct entry,
--- End diff --

managed


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644679#comment-16644679
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r223973121
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -181,22 +179,44 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 
 // 2) Then check the commit table
 // If the data was written at a previous epoch, check whether 
the transaction was invalidated
-Optional commitTimeStamp = 
commitTableClient.getCommitTimestamp(cellStartTimestamp).get();
-if (commitTimeStamp.isPresent()) {
-return commitTimeStamp.get();
+boolean invalidatedByOther = false;
+Optional commitTimestampFromCT = 
commitTableClient.getCommitTimestamp(cellStartTimestamp).get();
+if (commitTimestampFromCT.isPresent()) {
+if (isLowLatency && !commitTimestampFromCT.get().isValid())
+invalidatedByOther = true;
+else
+return commitTimestampFromCT.get();
 }
 
 // 3) Read from shadow cell
-commitTimeStamp = 
readCommitTimestampFromShadowCell(cellStartTimestamp, locator);
+Optional commitTimeStamp = 
readCommitTimestampFromShadowCell(cellStartTimestamp, locator);
 if (commitTimeStamp.isPresent()) {
 return commitTimeStamp.get();
 }
 
+// In case of LL, if found invalid ct cell, still must check 
sc in stage 3 then return
--- End diff --

Please add this comment: "This check is not needed in a non low latency 
mode, since during post commit, the client keeps the entry in the commit table 
when persisting the commit was done after the TSO lost its lease."


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644683#comment-16644683
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r223974301
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -181,22 +179,44 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 
 // 2) Then check the commit table
 // If the data was written at a previous epoch, check whether 
the transaction was invalidated
-Optional commitTimeStamp = 
commitTableClient.getCommitTimestamp(cellStartTimestamp).get();
-if (commitTimeStamp.isPresent()) {
-return commitTimeStamp.get();
+boolean invalidatedByOther = false;
+Optional commitTimestampFromCT = 
commitTableClient.getCommitTimestamp(cellStartTimestamp).get();
+if (commitTimestampFromCT.isPresent()) {
+if (isLowLatency && !commitTimestampFromCT.get().isValid())
+invalidatedByOther = true;
+else
+return commitTimestampFromCT.get();
 }
 
 // 3) Read from shadow cell
-commitTimeStamp = 
readCommitTimestampFromShadowCell(cellStartTimestamp, locator);
+Optional commitTimeStamp = 
readCommitTimestampFromShadowCell(cellStartTimestamp, locator);
 if (commitTimeStamp.isPresent()) {
 return commitTimeStamp.get();
 }
 
+// In case of LL, if found invalid ct cell, still must check 
sc in stage 3 then return
+if (invalidatedByOther) {
+assert(!commitTimestampFromCT.get().isValid());
+return commitTimestampFromCT.get();
+}
+
 // 4) Check the epoch and invalidate the entry
--- End diff --

or invalidate in a non latency mode


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644677#comment-16644677
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r223971768
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -181,22 +179,44 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 
 // 2) Then check the commit table
 // If the data was written at a previous epoch, check whether 
the transaction was invalidated
--- End diff --

This "If the data was written at a previous epoch," can be removed.


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644681#comment-16644681
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r223975342
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -240,7 +261,8 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 CellUtil.cloneQualifier(cell),
 cell.getTimestamp()),
 commitCache,
-tableAccessWrapper));
+tableAccessWrapper),
+isLowLatency);
--- End diff --

indent


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644684#comment-16644684
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r223993765
  
--- Diff: 
tso-server/src/main/java/org/apache/omid/tso/RequestProcessorSkipCT.java ---
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.omid.tso;
+
+import com.google.inject.Inject;
+import org.apache.omid.metrics.MetricsRegistry;
+import org.jboss.netty.channel.Channel;
+
+import java.io.IOException;
+
+public class RequestProcessorSkipCT extends AbstractRequestProcessor {
+
+
+private final ReplyProcessor replyProcessor;
+
+private final LeaseManagement leaseManager;
+private final Panicker panicker;
+private final String tsoHostAndPort;
+
+@Inject
+RequestProcessorSkipCT(MetricsRegistry metrics,
+   TimestampOracle timestampOracle,
+   ReplyProcessor replyProcessor,
+   Panicker panicker,
+   LeaseManagement leaseManager,
+   TSOServerConfig config,
+   LowWatermarkWriter lowWatermarkWriter,
+   String tsoHostAndPort) throws IOException {
+super(metrics, timestampOracle, panicker, config, 
lowWatermarkWriter);
+this.replyProcessor = replyProcessor;
+this.tsoHostAndPort = tsoHostAndPort;
+requestRing = disruptor.start();
+this.leaseManager = leaseManager;
+this.panicker = panicker;
+}
+
+private void commitSuicideIfNotMaster() {
+if (!leaseManager.stillInLeasePeriod()) {
+panicker.panic("Replica " + tsoHostAndPort + " lost mastership 
whilst flushing data. Committing suicide");
+}
+}
+
+@Override
+public void forwardCommit(long startTimestamp, long commitTimestamp, 
Channel c, MonitoringContext monCtx) {
+commitSuicideIfNotMaster();
--- End diff --

Add a comment that his is required since returning commit results when the 
TSO is not the leader might violate snapshot isolation. This is because we have 
to guarantee that committing transaction from previous tso has to persist all 
its data because a new transaction started by a new tso.


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis an

[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644675#comment-16644675
 ] 

ASF GitHub Bot commented on OMID-90:


Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/46#discussion_r22397
  
--- Diff: 
hbase-client/src/test/java/org/apache/omid/transaction/OmidTestBase.java ---
@@ -89,6 +88,8 @@ public void beforeGroups(ITestContext context) throws 
Exception {
 TSOServerConfig tsoConfig = new TSOServerConfig();
 tsoConfig.setPort(1234);
 tsoConfig.setConflictMapSize(1000);
+tsoConfig.setLowLatency(isLowLatency());
+tsoConfig.setWaitStrategy("LOW_CPU");
--- End diff --

nice


> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-09 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644500#comment-16644500
 ] 

Yonatan Gottesman commented on OMID-90:
---

[~giacomotaylor] [~ohads] I added a patch to integrate this with phoenix branch.

The patch applies on top of  OMID-115.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf, omid90.patch
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-10-09 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644495#comment-16644495
 ] 

ASF GitHub Bot commented on OMID-90:


GitHub user yonigottesman opened a pull request:

https://github.com/apache/incubator-omid/pull/46

[OMID-90] Integrate omid low latency to phoenix changes



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/yonigottesman/incubator-omid 
phoenix_ll_integration

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-omid/pull/46.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #46


commit 7647733a50431f2b8f5d4495310db59932c46e06
Author: Yonatan Gottesman 
Date:   2018-10-10T05:49:28Z

Integrate omid low latency to phoenix changes




> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-08-23 Thread Lianghong Xu (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16590999#comment-16590999
 ] 

Lianghong Xu commented on OMID-90:
--

Hi [~yonigo], so sorry for the very late response. We haven't got a chance to 
work on it due to lack of resources. We'll try to get back to you in a few 
weeks. Thanks for your patience!

Lianghong

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-08-12 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16577499#comment-16577499
 ] 

Yonatan Gottesman commented on OMID-90:
---

Hi [~lianghongxu], did you manage to get it working?

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-23 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553133#comment-16553133
 ] 

Yonatan Gottesman commented on OMID-90:
---

ok,

can i see you ycsb omid version?

you can use ycsb to measure the latency of each stage of the transaction 
(begin, hbase, commit) and then share it with us. begin time should be an order 
of magnitude less then original omid

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-23 Thread Lianghong Xu (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553122#comment-16553122
 ] 

Lianghong Xu commented on OMID-90:
--

Hi [~yonigo],

I thought so before, but we were able to get 110K QPS with YCSB on hbase with 
this setup.

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-23 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553119#comment-16553119
 ] 

Yonatan Gottesman commented on OMID-90:
---

Hi [~lianghongxu],

can you test the throughput of regular read/writes to *hbase* with this setup? 
(without omid at all).

Maybe you are reaching the max throughput ycsb can get

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-23 Thread Lianghong Xu (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553118#comment-16553118
 ] 

Lianghong Xu commented on OMID-90:
--

Hi [~yonigo],

We were using ycsb 0.15.0-SNAPSHOT. The experiment setup is as follow:
Hardware:
12 Omid clients: i3.2xlarge instances. 
2 TSO servers: HA setup, c3.8xlarge instances
20 HBase regionservers: i3.2xlarge instances.

YCSB:
1M records, 80/20 read/write ratio. uniform dist. filedcount = 4. For original 
Omid, we used 

numConcurrentCTWriters: 8
batchSizePerCTWriter: 50

The max throughput we could obtain for both original and OmidLL is around 
50-65K. We tried various tuning ourselves but couldn't seem to get it higher. 


Thanks,
Lianghong

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-23 Thread Lianghong Xu (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553109#comment-16553109
 ] 

Lianghong Xu commented on OMID-90:
--

Hi [~yonigo],

We were using ycsb 0.15.0-SNAPSHOT. The experiment setup is as follow:
Hardware:
12 Omid clients: i3.2xlarge instances. 
2 TSO servers: HA setup, c3.8xlarge instances
20 HBase regionservers: i3.2xlarge instances.

YCSB:
1M records, 80/20 read/write ratio. uniform dist. filedcount = 4. For original 
Omid, we used 

numConcurrentCTWriters: 8
batchSizePerCTWriter: 50

The max throughput we could obtain for both original and OmidLL is around 
50-65K. We tried various tuning ourselves but couldn't seem to get it higher. 


Thanks,
Lianghong

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-17 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16547434#comment-16547434
 ] 

Yonatan Gottesman commented on OMID-90:
---

Hi [~lianghongxu],

Can you please share with us the version of ycsb you are running, and the setup 
of your experiment?

As you can see in the paper, low latency benefits are seen when running in high 
throughput.

To what throughput do you get to with your ycsb instance?

Thanks

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-13 Thread Lianghong Xu (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16543619#comment-16543619
 ] 

Lianghong Xu commented on OMID-90:
--

Hi [~ohads] [~ebortnik] I just did an initial evaluation with Omid Low Latency 
version with YCSB. However, the result in terms of throughput and latency seems 
similar to the original Omid. I guess maybe there is something I'm missing? I 
was using the default configs except that I set "lowLatency: true" to be true 
in omid-server-configuration.yml. I think that should be enough to turn on the 
low latency mode, right? 

The YCSB workload we used has a read/write ratio of 80/20 with uniform dist. 
Please let us know if you have any suggestions on tuning.

Thanks,
Lianghong

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-09 Thread Lianghong Xu (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16537305#comment-16537305
 ] 

Lianghong Xu commented on OMID-90:
--

Hi [~ohads] [~ebortnik] thanks for providing the low latency implementation and 
sorry for the late response. We have not yet got a chance to test it due to 
lack of resources since it's near end of H1. We will try to do the benchmark by 
the end of July and will keep you updated. Thanks!

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-09 Thread Edward Bortnikov (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16536912#comment-16536912
 ] 

Edward Bortnikov commented on OMID-90:
--

[~lianghongxu], have you had a chance to play with the new protocol? Any 
feedback that you can share? 

Your experience matters as we move on to make the low-latency protocol part of 
Omid's next release. 

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-07-02 Thread Ohad Shacham (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16530297#comment-16530297
 ] 

Ohad Shacham commented on OMID-90:
--

Hi [~lianghongxu],

Did you try the low latency implementation?

Thx,

Ohad

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-06-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16509534#comment-16509534
 ] 

ASF GitHub Bot commented on OMID-90:


GitHub user yonigottesman opened a pull request:

https://github.com/apache/incubator-omid/pull/38

[OMID-90]

Implement low latency protocol for omid.
TSO does not commit transactions to commit table and lets the client write 
to commit table.
To insure snapshot isolation, clients invalidate transactions while reading 
from commit table.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/yonigottesman/incubator-omid omid-low-latency

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-omid/pull/38.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #38


commit 475f35267c892cbee42316008c80df7132f29895
Author: Yonatan Gottesman 
Date:   2018-06-12T11:45:48Z

Low latency protocol




> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Assignee: Yonatan Gottesman
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-05-24 Thread Lianghong Xu (JIRA)

[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16489509#comment-16489509
 ] 

Lianghong Xu commented on OMID-90:
--

[~ebortnik] That sounds great! Please let me know when it is ready. Thanks!

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-05-24 Thread Edward Bortnikov (JIRA)

[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16488611#comment-16488611
 ] 

Edward Bortnikov commented on OMID-90:
--

[~lianghongxu], I work with [~ohads], nice to e-meet :). 

We can provide experimental code in 2-3 weeks, would that be a fit for you? 

Thanks. 

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-05-23 Thread Lianghong Xu (JIRA)

[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16488127#comment-16488127
 ] 

Lianghong Xu commented on OMID-90:
--

Hi [~ohads], just a kind reminder, do you have any near plan to open source 
this new version of Omid?

Thanks,
Lianghong

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-05-17 Thread Lianghong Xu (JIRA)

[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16479432#comment-16479432
 ] 

Lianghong Xu commented on OMID-90:
--

Hi [~ohads],

Very cool and congrats on the VLDB acceptance! We are evaluating Omid for our 
ads systems, but was hitting a performance bottleneck caused by the centralized 
batch commit. Do you have a plan when to open source Omid LL? Also, at this 
point, would it be possible for you to provide us with the Omid LL prototype so 
that we can evaluate its performance?

Thanks!
Lianghong

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Priority: Major
> Attachments: OmidCloud-VLDB.pdf
>
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-05-17 Thread Ohad Shacham (JIRA)

[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16478884#comment-16478884
 ] 

Ohad Shacham commented on OMID-90:
--

Hi [~lianghongxu],

Please find attached a paper describing the low latency version of Omid. The 
paper will appear in VLDB 2018.

It would be very interesting to know the use case of Omid in your production 
system. Is it possible?

Thanks,

Ohad

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Priority: Major
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-90) Reducing begin/commit latency by distributing the write to the commit table

2018-05-15 Thread Lianghong Xu (JIRA)

[ 
https://issues.apache.org/jira/browse/OMID-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16476306#comment-16476306
 ] 

Lianghong Xu commented on OMID-90:
--

Hi, we are exploring using Omid in our production systems at Pinterest and also 
observed the same issue described above. I'm wondering what is the current 
progress of this? If you have a design doc, would you mind sharing it? Thanks!

> Reducing begin/commit latency by distributing the write to the commit table
> ---
>
> Key: OMID-90
> URL: https://issues.apache.org/jira/browse/OMID-90
> Project: Apache Omid
>  Issue Type: New Feature
>Reporter: Ohad Shacham
>Priority: Major
>
> Today, Omid's commits are done by the transaction manager. In order to 
> efficiently write to the commit table, the transaction manager batches these 
> writes. This optimization, even thought reduces the write time to HBase, 
> significantly increases the begin and commit latency. The commit latency 
> increases since a commit operation returns only after its commit timestamp 
> was persisted in the commit table. And the begin latency increases since 
> begin returns a transaction id that is also used by the transaction to 
> identify its snapshot and therefore, begin returns only after all commits 
> with commit id smaller than the begin id was persisted in the commit table. 
> This is crucial, since a snapshot change during a transaction run may violate 
> snapshot isolation. 
>  
> The idea of this feature is to distribute the commit by moving the write to 
> the commit table from the server to the client. The transaction manager does 
> conflict analysis and returns a commit timestamp. While the client atomically 
> persists this commit in the commit table.
> This significantly reduces the begin and commit latency, since batching is 
> not required anymore. A begin operation can immediately returns and a commit 
> operation returns after conflict detection. 
> This can introduce snapshot isolation violation since a slow client can 
> commit and change other transaction's snapsho. Therefore, we use an 
> invalidation technique which is similar to the one Omid uses today to 
> maintain snapshot isolation in high availability mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)