You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Samarth Jain (JIRA)" <ji...@apache.org> on 2015/01/14 06:49:34 UTC
[jira] [Comment Edited] (PHOENIX-1581) Setting DISABLE_WAL to false
via ALTER TABLE doesn't work
[ https://issues.apache.org/jira/browse/PHOENIX-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14276516#comment-14276516 ]
Samarth Jain edited comment on PHOENIX-1581 at 1/14/15 5:49 AM:
----------------------------------------------------------------
Looks like the issue exists on 4.2 too. Below is the test case that I will be adding in AlterTableIT with @ignore annotation :
{code}
@Test
public void testTogglingWalEnabled() throws Exception {
Connection conn = DriverManager.getConnection(getUrl());
try {
String ddl = "create table IF NOT EXISTS testReenablingWal ("
+ " id char(1) NOT NULL,"
+ " col1 integer NOT NULL,"
+ " col2 bigint NOT NULL,"
+ " CONSTRAINT NAME_PK PRIMARY KEY (id, col1, col2)"
+ " )";
conn.createStatement().execute(ddl);
asssertIsWALDisabled(conn, "testReenablingWal".toUpperCase(), false);
ddl = "ALTER TABLE testReenablingWal SET DISABLE_WAL = true";
conn.createStatement().execute(ddl);
asssertIsWALDisabled(conn, "testReenablingWal".toUpperCase(), true);
ddl = "ALTER TABLE testReenablingWal SET DISABLE_WAL = false";
conn.createStatement().execute(ddl);
asssertIsWALDisabled(conn, "testReenablingWal".toUpperCase(), false);
} finally {
conn.close();
}
}
{code}
was (Author: samarthjain):
Looks like the issue exists on 4.2 too. Below is the test case:
{code}
@Test
public void testTogglingWalEnabled() throws Exception {
Connection conn = DriverManager.getConnection(getUrl());
try {
String ddl = "create table IF NOT EXISTS testReenablingWal ("
+ " id char(1) NOT NULL,"
+ " col1 integer NOT NULL,"
+ " col2 bigint NOT NULL,"
+ " CONSTRAINT NAME_PK PRIMARY KEY (id, col1, col2)"
+ " )";
conn.createStatement().execute(ddl);
asssertIsWALDisabled(conn, "testReenablingWal".toUpperCase(), false);
ddl = "ALTER TABLE testReenablingWal SET DISABLE_WAL = true";
conn.createStatement().execute(ddl);
asssertIsWALDisabled(conn, "testReenablingWal".toUpperCase(), true);
ddl = "ALTER TABLE testReenablingWal SET DISABLE_WAL = false";
conn.createStatement().execute(ddl);
asssertIsWALDisabled(conn, "testReenablingWal".toUpperCase(), false);
} finally {
conn.close();
}
}
{code}
> Setting DISABLE_WAL to false via ALTER TABLE doesn't work
> ---------------------------------------------------------
>
> Key: PHOENIX-1581
> URL: https://issues.apache.org/jira/browse/PHOENIX-1581
> Project: Phoenix
> Issue Type: Bug
> Reporter: Gabriel Reid
>
> If I alter a table to disable the WAL (i.e. ALTER TABLE MYTAB SET DISABLE_WAL = true), then things work as expected.
> However, if I then attempt to re-enable the WAL (i.e. ALTER TABLE MYTAB SET DISABLE_WAL = false), nothing changes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)