[ 
https://issues.apache.org/jira/browse/OAK-7855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16660452#comment-16660452
 ] 

Marcel Reutegger edited comment on OAK-7855 at 10/23/18 11:20 AM:
------------------------------------------------------------------

[~reschke], I'm wondering if unconditionally setting the schema level/version 
on update to the most recent one is really correct.

Consider the case described in this issue. Oak is on version 1.8.x, but the 
schema level is still 1 because the DB user does not have permission to change 
the table. The 'nodes' table will have rows where the version field is set to 
2, even though the table does not have fields required for level/version 2 
({{sdtype}} and {{sdmaxrevtime}}).

I can create an issue if you think this is a problem.


was (Author: mreutegg):
[~reschke], I'm wondering if unconditionally setting the schema level/version 
to the most recent one is really correct.

Consider the case described in this issue. Oak is on version 1.8.x, but the 
schema level is still 1 because the DB user does not have permission to change 
the table. The 'nodes' table will have rows where the version field is set to 
2, even though the table does not have fields required for level/version 2 
({{sdtype}} and {{sdmaxrevtime}}).

I can create an issue if you think this is a problem.

> Invalid SplitDocType
> --------------------
>
>                 Key: OAK-7855
>                 URL: https://issues.apache.org/jira/browse/OAK-7855
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: documentmk, rdbmk
>    Affects Versions: 1.8.0
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Major
>              Labels: candidate_oak_1_8
>             Fix For: 1.10, 1.9.10
>
>         Attachments: OAK-7855.diff
>
>
> After upgrading a repository from 1.8.2 to 1.8.7 on RDB the background update 
> thread started to log warnings that complain about invalid SplitDocType:
> {noformat}
> java.lang.IllegalArgumentException: Not a valid SplitDocType :0
> {noformat}
> It is also worth noting that the automatic database schema upgrade fails on 
> that repository with:
> {noformat}
> org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore Attempted to 
> upgrade NODES to DB level 2 using 'alter table NODES add SDTYPE smallint', 
> but failed - will continue without.
> com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, 
> SQLSTATE=42501, SQLERRMC=Q1D18T05;ALTER TABLE;G031.NODES, DRIVER=4.23.42
> {noformat}
> and
> {noformat}
> org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore Attempted to 
> upgrade NODES to DB level 2 using 'create index NODES_SDT on NODES (SDTYPE) 
> exclude null keys', but failed - will continue without.
> com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-205, 
> SQLSTATE=42703, SQLERRMC=SDTYPE;G031.NODES, DRIVER=4.23.42
> {noformat}
> It turns out this is unrelated to the update from 1.8.2 to 1.8.7. The issue 
> also occurs with 1.8.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to