Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1511

append_getlasterror() should ignore unset fsync/journal from link

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.6.13
    • Fix Version/s: 1.6.14
    • Component/s: pecl-mongo
    • Labels:
      None
    • # Replies:
      3
    • Last comment by Customer:
      true

      Description

      While fixing test failures for PHP-1510, I noticed that append_getlasterror() (used by the legacy write code path) always inherits fsync and journal for the link, even if they are unset (i.e. -1). This is problematic due to the following, which appears later in the function:

      /* fsync forces "w" to be atleast 1, so don't touch it if it's
       * already set to something else above while parsing "w" (and
       * "safe") */
      if (fsync && w == 0) {
          w = 1;
      }
      

      For what it's worth, is_gle_op() only considers fsync/journal options on the link if they are 1, and only then as a fallback if there are no fsync/j options in the write operation itself.

        Attachments

          Activity

            People

            • Assignee:
              jmikola Jeremy Mikola
              Reporter:
              jmikola Jeremy Mikola
              Participants:
              Last commenter:
              Rathi Gnanasekaran (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                3 years, 39 weeks, 1 day ago
                Date of 1st Reply: