You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Sergey Uttsel (Jira)" <ji...@apache.org> on 2022/09/19 08:28:00 UTC
[jira] [Comment Edited] (IGNITE-17627) Extend MvPartitionStorage API with write intent resolution capabilities
[ https://issues.apache.org/jira/browse/IGNITE-17627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17606491#comment-17606491 ]
Sergey Uttsel edited comment on IGNITE-17627 at 9/19/22 8:27 AM:
-----------------------------------------------------------------
As was discussed read(RowId rowId, HybridTimestamp timestamp) method must return structure:
{
BinaryRow row
@Nullable UUID txId
@Nullable \{UUID, short} commitPartId
/** Last committed value timestamp. */
@Nullable HybridTimestamp timestamp
}
scan(Predicate<BinaryRow> keyFilter, HybridTimestamp timestamp) must return cursor with this structure.
commitPartId contains \{ UUID tableId, short partId }
Need to pass commitPartId into MvPartitionStorage#addWrite to save it into a write intent.
was (Author: sergey uttsel):
As was discussed read(RowId rowId, HybridTimestamp timestamp) method must return structure:
{
BinaryRow row
@Nullable UUID txId
@Nullable \{UUID, short} commitPartId
/** Last committed value timestamp. */
@Nullable HybridTimestamp timestamp
}
scan(Predicate<BinaryRow> keyFilter, HybridTimestamp timestamp) must return cursor with this structure.
commitPartId contains \{ UUID tableId, short partId }
Need to pass commitPartId into MvPartitionStorage#addWrite to save it into a write intent.
> Extend MvPartitionStorage API with write intent resolution capabilities
> -----------------------------------------------------------------------
>
> Key: IGNITE-17627
> URL: https://issues.apache.org/jira/browse/IGNITE-17627
> Project: Ignite
> Issue Type: Improvement
> Reporter: Ivan Bessonov
> Assignee: Semyon Danilov
> Priority: Major
> Labels: ignite-3
>
> Commit of RW transaction is not instantaneous. RO transaction might require reads of data that's in the process of being committed. Current API doesn't support such scenario.
> RO API in partition storage has only two methods: {{read}} and {{{}scan{}}}.
> h3. Read
> This one is pretty simple. It should return pair of {{binaryRow}} and {{{}txId{}}}. After that, caller can check the state of the transaction and either return the value or repeat the call.
> There must be a way to hint read method that uncommitted data must be skipped.
> An interesting way of reading data might be required: it there's a write intent, but we see a commit done after the timestamp, we can safely proceed with reading.
> Unfortunately, such optimization may be heavy on the storage read operations, because it requires a "deep" look-ahead request. So, whether or not we implement this depends on one thing - how often do we have write intent resolution in real RO transactions?
> API is to be defined.
> h3. Scan
> This one is tricky, we can't just return a cursor. Special type of cursor is required, and it must allow same read capabilities on each individual element.
> API is to be defined.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)