Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: trouble with restore and policy

  1. #21
    question about type of data. i find table with type of data only in planningguide, and i dont see type of data how date, time and other types. why so little?

  2. #22
    Super Moderator
    Join Date
    Dec 2011
    Posts
    217
    Hi Ilia,

    The supported datatypes are listed on the reference page in Using VoltDB for CREATE TABLE.

    -Ben

  3. #23
    Hi, question about replica
    look at my action:
    1.create master.xml with <dr id="1" listen="true" />
    2.create replica.xml with <dr id="2" listen="true">
    <connection source="192.168.1.1" />
    </dr>
    3.master:voltdb create -d master.xml -H 192.168.1.1
    4.repcila:voltdb create --replica -H 192.168.2.1 -d replica.xml --admin=43434 and other port change for starting replica on 1 local machine, all ok, all worked
    then
    5.on replica and master same dr table, all ok.
    6.all worked, i insert row in master its replicted on replica all ok.
    7.then i change master.xml and write listen=false, then voltdadmin update
    8. i insert row on master and this row dont replicated on replica, all ok
    9.i change master.xml and write listen=true, then voltdadmin update
    10. i write select* on replica and dont see last row, w8 some time and dont see last row. its not ok
    11. i insert row on master and this row dont replicated on replica, its not ok
    12. i shutdonw replica, create new replica, use select* on relica and see all row how on master, all ok
    13. if i wanna change replica.xml and update this with voltadmin update he write error, i cant change replica.xml
    14. if i update replica.xml with no changes i can do it, if i change replica.xml i cant update.
    15. i shutdown master, write voltadmin promote replica, all ok, all work
    but now i cant change replica.xml(new master) i want delete <connection source="master" /> on new master, but cant.
    and when i create new replica i must change <connection source="newmaster" />, and when i create replica he cant connect.
    i change id or ip error.
    Безымянный.jpg

    i dont undestand how it works.
    Last edited by Ilia; 07-16-2015 at 03:04 PM.

  4. #24
    Senior Member
    Join Date
    Apr 2014
    Posts
    152
    Ilia,

    Lets take a look at each issue you've encountered.

    7.then i change master.xml and write listen=false, then voltdadmin update
    8. i insert row on master and this row dont replicated on replica, all ok
    9.i change master.xml and write listen=true, then voltdadmin update
    10. i write select* on replica and dont see last row, w8 some time and dont see last row. its not ok
    11. i insert row on master and this row dont replicated on replica, its not ok
    12. i shutdonw replica, create new replica, use select* on relica and see all row how on master, all ok
    Here you run into a problem where you've already enabled DR and you turned it off. When you turn DR off in this manner, step 7, and reconnect it, step 9, this is expected output, step 10 and 11. This is not the intended usage of DR. In order to re-establish replication, you'll need to restart the replica, step 12.

    13. if i wanna change replica.xml and update this with voltadmin update he write error, i cant change replica.xml
    14. if i update replica.xml with no changes i can do it, if i change replica.xml i cant update.
    15. i shutdown master, write voltadmin promote replica, all ok, all work
    but now i cant change replica.xml(new master) i want delete <connection source="master" /> on new master, but cant.
    and when i create new replica i must change <connection source="newmaster" />, and when i create replica he cant connect.
    i change id or ip error.
    There are restrictions to what can and can not update with the deployment file. Please show us your 'replica.xml' file so we can understand what you are trying to do for both steps 13 and 14.
    For step 15, please show us both your 'master.xml' and 'replica.xml'. Is your intent in step 15 to have a master/replica, kill master and promote replica to new master, and then make the old master a new replica? Please refer to here for full documentation of acceptable changes to deployment.xml file.

    Peter Zhao

  5. #25
    Hi, Peter I understood how it works.
    If I have this configurations file all works righ.
    depnew.jpgrepnew.jpg
    About my question for step 13 and 14.
    IP master=192.168.1.134, IP replica=192.168.1.135 –replication=6666 and other changed ports
    I have this configuration file
    dep.jpgrep.jpg
    Then I do shutdown muster and promote replica

    Then I wanna update my rep.xml with no changed, and all ok

    And now I want change <connection> on my replica.xml and I take this error
    Безымянный.jpg
    Tell me why I cant change source IP on new master, cuz its master I no need source IP? Why I cant.
    If I create new replica on old master with depnew.xml all work.

    RESULT: If I wanna create master and replica db I must configure this configuration file how 1st and 2 screen.
    Last edited by Ilia; 07-17-2015 at 11:56 AM.

  6. #26
    Senior Member
    Join Date
    Apr 2014
    Posts
    152
    Ilia,

    RESULT: If I wanna create master and replica db I must configure this configuration file how 1st and 2 screen.
    Correct. At this time, you can not update connection source in the deployment file but this may change in the future.
    Please refer to here for full documentation of acceptable changes to deployment.xml file.

    Peter Zhao

  7. #27
    Hi all again
    question about query and subquery, i see in UsingVoltdb http://docs.voltdb.com/UsingVoltDB/sqlref_select.php description for select. But in my db subquery not worked mb this not supported on community edition? tell me?
    that my example:

    table

    code model price
    1 sony 100
    2 toshiba 200
    3 samsung 300
    query:
    Select price from table where price < (select max(price) from table);
    this query not wokred and write error unsupported.

  8. #28
    Super Moderator
    Join Date
    Dec 2011
    Posts
    217
    Hi Ilia,

    This should work. I tested it on v5.4 (see below). The Release Notes mention that support for this form of scalar subquery was added in v5.3.

    SQL Command :: localhost:21212
    1> create table foo (code int, model varchar(10), price int);
    Command succeeded.
    2> insert into foo values (1, 'sony',100);
    (Returned 1 rows in 0.08s)
    3> insert into foo values (2,'toshiba',200);
    (Returned 1 rows in 0.01s)
    4> insert into foo values (3, 'samsung', 300);
    (Returned 1 rows in 0.01s)
    5> select price from foo where price < (select max(price) from foo);
    PRICE
    ------
    100
    200


    -Ben

  9. #29
    ty Ben
    i tested it on 5.2.2

  10. #30
    Hi all, again question about select subquery
    This is my test db.
    product
    maker model type
    A 1232 PC
    A 1233 PC
    A 1276 Printer
    A 1298 Laptop
    A 1401 Printer
    A 1408 Printer
    A 1752 Laptop
    B 1121 PC
    B 1750 Laptop
    C 1321 Laptop
    D 1288 Printer
    D 1433 Printer
    E 1260 PC
    E 1434 Printer
    E 2112 PC
    E 2113 PC

    pc
    code model speed ram hd cd price
    1 1232 500 64 5.0 12x 600.0000
    10 1260 500 32 10.0 12x 350.0000
    11 1233 900 128 40.0 40x 980.0000
    12 1233 800 128 20.0 50x 970.0000
    2 1121 750 128 14.0 40x 850.0000
    3 1233 500 64 5.0 12x 600.0000
    4 1121 600 128 14.0 40x 850.0000
    5 1121 600 128 8.0 40x 850.0000
    6 1233 750 128 20.0 50x 950.0000
    7 1232 500 32 10.0 12x 400.0000
    8 1232 450 64 8.0 24x 350.0000
    9 1232 450 32 10.0 24x 350.0000

    Printer
    code model color type price
    1 1276 n Laser 400.0000
    2 1433 y Jet 270.0000
    3 1434 y Jet 290.0000
    4 1401 n Matrix 150.0000
    5 1408 n Matrix 270.0000
    6 1288 n Laser 400.0000

    Laptop
    code model speed ram hd price screen
    1 1298 350 32 4.0 700.0000 11
    2 1321 500 64 8.0 970.0000 12
    3 1750 750 128 12.0 1200.0000 14
    4 1298 600 64 10.0 1050.0000 15
    5 1752 750 128 10.0 1150.0000 14
    6 1298 450 64 10.0 950.0000 12

    I wanna find avg price pc and laptop where maker=a. select maker.
    Look at this screen where I write 2 query and 1 of this not worked cuz unsupported subquery in IN operator.
    screen[1].jpg
    query.sql:
    select avg(price) from(
    select avg(price) as price from pc join product on product.model=pc.model where maker='a'
    union
    select avg(price) as price from laptop join product on product.model=laptop.model where maker='a') ty;

    query1.sql:
    select avg(price)
    from(
    select code, price, pc.model, ram, hd
    from pc
    where model IN(
    select model from product where maker='a'
    )
    union
    select code, price, pc.model, ram, hd
    from pc
    where model IN(
    select model from product where maker='a')) ty;
    Last edited by Ilia; 07-24-2015 at 07:56 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •