Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-14989

Implementation of Mutation.getWriteToWAL() is backwards

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0, 1.3.0, 1.0.3, 1.1.3, 0.98.17
    • Client
    • None
    • Reviewed

    Description

      The implementation of the deprecated getWriteToWAL is backwards. It should return true if this.durability == Durability.SYNC_WAL:

      /**
         * @deprecated Use {@link #getDurability()} instead.
         * @return true if edits should be applied to WAL, false if not
         */
        @Deprecated
        public boolean getWriteToWAL() {
          return this.durability == Durability.SKIP_WAL;
        }
      

      For example, if mutation.durability is Durability.SYNC_WAL and the following code is called clonedMutation.setWriteToWAL(mutation.getWriteToWAL()), it will disable writing to the WAL for clonedMutation.

      Attachments

        1. HBASE-14989.1.branch-1.patch
          0.6 kB
          Sean Busbey
        2. hbase-14989-branch-1_v1.patch
          0.6 kB
          Enis Soztutar

        Activity

          People

            enis Enis Soztutar
            jamestaylor James R. Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: