Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-20888

TxnHandler: sort() called on immutable lists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • Transactions
    • None
    • n/a

    Description

              } else {
                assert (!rqst.isSetSrcTxnToWriteIdList());
                assert (rqst.isSetTxnIds());
                txnIds = rqst.getTxnIds();
              }
      
              Collections.sort(txnIds); //easier to read logs and for assumption done in replication flow
      

      when the input comes from

        @Override
        public long allocateTableWriteId(long txnId, String dbName, String tableName) throws TException {
          return allocateTableWriteIdsBatch(Collections.singletonList(txnId), dbName, tableName).get(0).getWriteId();
        }
      
      java.lang.UnsupportedOperationException: null
          at java.util.AbstractList.set(AbstractList.java:132) ~[?:1.8.0]
          at java.util.AbstractList$ListItr.set(AbstractList.java:426) ~[?:1.8.0]
          at java.util.Collections.sort(Collections.java:170) ~[?:1.8.0]
          at org.apache.hadoop.hive.metastore.txn.TxnHandler.allocateTableWriteIds(TxnHandler.java:1523) ~[hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
          at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.allocate_table_write_ids(HiveMetaStore.java:7349) ~[hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
      

      Attachments

        1. HIVE-20888.01.patch
          1 kB
          Igor Kryvenko

        Activity

          People

            ikryvenko Igor Kryvenko
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: