You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2019/01/29 15:26:51 UTC
[ignite] 01/05: Preparing.
This is an automated email from the ASF dual-hosted git repository.
vozerov pushed a commit to branch ignite-10985
in repository https://gitbox.apache.org/repos/asf/ignite.git
commit 72ee531d01626dc1ec3a569cd400829b0941bfc1
Author: devozerov <vo...@gridgain.com>
AuthorDate: Tue Jan 29 15:57:32 2019 +0300
Preparing.
---
.../processors/query/h2/database/H2RowFactory.java | 35 ++++++++++++++--------
1 file changed, 22 insertions(+), 13 deletions(-)
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2RowFactory.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2RowFactory.java
index 724de7e..5b4827b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2RowFactory.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2RowFactory.java
@@ -54,18 +54,14 @@ public class H2RowFactory {
* @throws IgniteCheckedException If failed.
*/
public GridH2Row getRow(long link) throws IgniteCheckedException {
- // TODO Avoid extra garbage generation. In upcoming H2 1.4.193 Row will become an interface,
- // TODO we need to refactor all this to return CacheDataRowAdapter implementing Row here.
+ CacheDataRowAdapter row = new CacheDataRowAdapter(link);
- final CacheDataRowAdapter rowBuilder = new CacheDataRowAdapter(link);
+ row.initFromLink(
+ cctx.group(),
+ CacheDataRowAdapter.RowData.FULL // TODO: Appropriate data!
+ );
- rowBuilder.initFromLink(cctx.group(), CacheDataRowAdapter.RowData.FULL);
-
- GridH2Row row = rowDesc.createRow(rowBuilder);
-
- assert row.version() != null;
-
- return row;
+ return rowDesc.createRow(row);
}
/**
@@ -76,8 +72,21 @@ public class H2RowFactory {
* @return Row.
* @throws IgniteCheckedException If failed.
*/
- public GridH2Row getMvccRow(long link, long mvccCrdVer, long mvccCntr, int mvccOpCntr) throws IgniteCheckedException {
- return rowDesc.createRow(new MvccDataRow(cctx.group(),0, link,
- PageIdUtils.partId(PageIdUtils.pageId(link)),null, mvccCrdVer, mvccCntr, mvccOpCntr));
+ public GridH2Row getMvccRow(long link, long mvccCrdVer, long mvccCntr, int mvccOpCntr)
+ throws IgniteCheckedException {
+ int partId = PageIdUtils.partId(PageIdUtils.pageId(link));
+
+ MvccDataRow row = new MvccDataRow(
+ cctx.group(),
+ 0,
+ link,
+ partId,
+ null, // TODO: Appropriate data!
+ mvccCrdVer,
+ mvccCntr,
+ mvccOpCntr
+ );
+
+ return rowDesc.createRow(row);
}
}