ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergi Vladykin <sergi.vlady...@gmail.com>
Subject Re: We want to add an "dynamic create index" interface to ignite replacing index annotation, do you have any suggestions?
Date Mon, 07 Dec 2015 07:04:11 GMT
Hi,

ALTER TABLE ADD COLUMN will not work because it copies the whole table with
new column in H2.

I think you are right, we need to modify GridH2Table in place, though we
need to make sure that
dynamic indexes will be consistent with other existing indexes and no
concurrent updates are lost.

There are multiple ways to notify other nodes, I think I will come up with
design soon.

Sergi


2015-12-04 5:29 GMT+03:00 bluehu <hushenglan@gmail.com>:

> This ticket meets our requirement, I am trying to add “addIndex” interface
> in
> IgniteCache(IgniteCacheProxy) as you said.
>
> I have studied the code on ignite index, including these classes:
> QueryProcessor, IgniteH2Indexing, GridH2Table, GridH2TreeIndex,
> TypeDescriptor, TableDescriptor, RowDescriptor, IndexDescriptor, etc..
>
> I had wanted to use SQL on h2database like "ALTER TABLE ADD [column]..." to
> add a new column and it's index to GridH2Table, but I found "ALTER
> TABLE..."
> can not specify engine like this "engine
> "org.apache.ignite.internal.processors.query.h2.opt.GridH2Table$Engine"",
> so
> I give up this way.
>
> Now I trying to modify the object of GridH2Table directly through
> QueryProcessor and IgniteH2Indexing, including GridH2Table's member:
> Column,
> RowDescriptor and GridH2TreeIndex.
> the stack like this:
> <
> http://apache-ignite-users.70518.x6.nabble.com/file/n2138/QQ%E6%88%AA%E5%9B%BE20151204102451.png
> >
>
>
> I have two questions at present:
> 1.Is my thinking the right direction?
> 2.How can I notify other ignite node to add index?
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/We-want-to-add-an-dynamic-create-index-interface-to-ignite-replacing-index-annotation-do-you-have-an-tp2122p2138.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message