• Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      A FetchAndPersistSampleTask identifies the collection to sample by namespace only. Make it persist a sample only of the collection it was queued for.

      Background

      SERVER-135421 queues a FetchAndPersistSampleTask when a query falls back to an on-the-fly sample because no persisted sample serves it. The task carries the collection's namespace, and PSAME later runs it through SampleManager::refresh(), which acquires the collection by that namespace.

      Between the task being queued and run, the collection may be renamed, or dropped and its namespace reused by a new collection. The task then samples, and persists a sample of, whatever collection the namespace names when it runs.

      Scope of Work

      • Carry the UUID of the collection the task was queued for.
      • Make SampleManager::refresh() acquire the collection with that expected UUID (CollectionAcquisitionRequest supports an expected UUID and fails with CollectionUUIDMismatch when the namespace names another collection, or none).
      • Decide how PSAME treats that failure: skip the task rather than retry it.

      Acceptance Criteria

      • A task queued for a collection that was since renamed, or dropped and its namespace reused, persists nothing.
      • Unit tests cover both cases.

            Assignee:
            Unassigned
            Reporter:
            Carlos Alonso Pérez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: