phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JamesRTaylor <>
Subject [GitHub] phoenix pull request #291: [PHOENIX-4278] Implement pure client side transac...
Date Thu, 08 Feb 2018 01:17:39 GMT
Github user JamesRTaylor commented on a diff in the pull request:
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/query/
    @@ -850,19 +849,12 @@ private void addCoprocessors(byte[] tableName, HTableDescriptor
descriptor, PTab
                         && !SchemaUtil.isMetaTable(tableName)
                         && !SchemaUtil.isStatsTable(tableName)) {
                     if (isTransactional) {
    -                    if (!descriptor.hasCoprocessor(PhoenixTransactionalIndexer.class.getName()))
    -                        descriptor.addCoprocessor(PhoenixTransactionalIndexer.class.getName(),
null, priority, null);
    -                    }
    --- End diff --
    This handles the case of the creation of new tables, but we'd need to handle the case
of existing tables as well. This is somewhat trickier because ideally we'd want to handle
the case in which the server jar has been upgraded, but the client jar hasn't been. Until
the client is upgraded (in which case index maintenance will occur on the client side), we'd
need to continue performing index maintenance through this coprocessor. The somewhat clunky
way of doing that is to pass the client Phoenix version through the PhoenixIndexMetaData.
This would be somewhat painful.
    Since we've labelled transactions as "beta", perhaps we can punt on this. In this case,
we'd require both the client and server jar to be upgraded at the same time (if transactional
tables are already being used). With this approach, we'd want to modify PhoenixTransactionalIndexer
to be an empty class derived still from BaseRegionObserver.


View raw message