Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-1663

Clean-up in-code documentation for KuduScanner::ReadMode and KuduClient::GetLatestObservedTimestamp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.0
    • 1.1.0
    • api, client, documentation
    • None

    Description

      After reading the in-line doc for the subj. entities, one would expect the scanner from the following code to do its job on reading-what-you-have-written:

      const uint64_t snapshot_timestamp = client->GetLatestObservedTimestamp();
      
      KuduScanner scanner(table.get());
      RETURN_NOT_OK(scanner.SetSnapshotRaw(snapshot_timestamp));
      RETURN_NOT_OK(scanner.SetSelection(KuduClient::LEADER_ONLY));
      RETURN_NOT_OK(scanner.SetReadMode(KuduScanner::READ_AT_SNAPSHOT));
      RETURN_NOT_OK(scanner.Open());
      

      However, it does not work.

      To make it work, it's necessary to add extra 1 to the snapshot timestamp:

      RETURN_NOT_OK(scanner.SetSnapshotRaw(snapshot_timestamp + 1));
      

      Attachments

        Issue Links

          Activity

            People

              aserbin Alexey Serbin
              aserbin Alexey Serbin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: