microsoft/FASTER · error · FasterException

BlittableAllocator memory pages are sector aligned - use…

Error message

BlittableAllocator memory pages are sector aligned - use direct copy

What it means

PopulatePage copies caller-supplied bytes into a freshly allocated page; blittable pages are already sector-aligned device memory filled directly by I/O, so software population is meaningless and intentionally unimplemented. The override throws FasterException to catch any code path attempting the object-allocator's page-population flow on a BlittableAllocator.

Solutions

  1. Do not call PopulatePage for blittable logs; pages are filled directly via device I/O with sector-aligned copies.
  2. If copying into a blittable page, write to the page's pointer (direct memcpy) respecting sector alignment instead of the PopulatePage hook.
  3. If object-style population is needed, switch to the ObjectAllocator (class-typed Key/Value).

Example fix

// before
allocator.PopulatePage(src, requiredBytes, destinationPage); // on BlittableAllocator

// after
// copy directly into the aligned page buffer:
Buffer.MemoryCopy((void*)pagePointer, (void*)src, requiredBytes, requiredBytes);
Defensive patterns

Strategy: validation

Validate before calling

// internal API: only call PopulatePage on ObjectAllocator, never BlittableAllocator
if (allocator is BlittableAllocator<K, V>)
    throw new InvalidOperationException("Use direct sector-aligned copy for blittable pages");

Type guard

bool NeedsPopulatePage(FasterKV<K, V>.ILogAllocator a) => a is ObjectAllocator<K, V>;

Try / catch

try { allocator.PopulatePage(src, bytes, page); }
catch (FasterException ex) when (ex.Message.Contains("sector aligned - use direct copy")) { /* memcpy into page pointer instead */ }

Prevention

When it happens

Trigger: An internal or custom code path invoking PopulatePage on the BlittableAllocator - e.g. a custom allocator/commit-manager patch, or object-log-style page fill logic reused against a blittable log.

Common situations: Extending FASTER with custom device/commit logic modeled on the object allocator; misuse of internal (internal-visibility) APIs in patched builds rather than end-user scenarios.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of microsoft/FASTER@321d872eab (2026-09-15). Data as JSON: /api/errors/389d6ec5c0f27810. Report an issue: GitHub.

Appendix: source

Thrown at cs/src/core/Allocator/BlittableAllocator.cs:372

        /// Whether KVS has values to serialize/deserialize
        /// </summary>
        /// <returns></returns>
        public override bool ValueHasObjects()
        {
            return false;
        }

        public override IHeapContainer<Key> GetKeyContainer(ref Key key) => new StandardHeapContainer<Key>(ref key);
        public override IHeapContainer<Value> GetValueContainer(ref Value value) => new StandardHeapContainer<Value>(ref value);

        public override long[] GetSegmentOffsets()
        {
            return null;
        }

        internal override void PopulatePage(byte* src, int required_bytes, long destinationPage)
        {
            throw new FasterException("BlittableAllocator memory pages are sector aligned - use direct copy");
        }

        /// <summary>
        /// Iterator interface for pull-scanning FASTER log
        /// </summary>
        public override IFasterScanIterator<Key, Value> Scan(FasterKV<Key, Value> store, long beginAddress, long endAddress, ScanBufferingMode scanBufferingMode) 
            => new BlittableScanIterator<Key, Value>(store, this, beginAddress, endAddress, scanBufferingMode, epoch, logger: logger);

        /// <summary>
        /// Implementation for push-scanning FASTER log, called from LogAccessor
        /// </summary>
        internal override bool Scan<TScanFunctions>(FasterKV<Key, Value> store, long beginAddress, long endAddress, ref TScanFunctions scanFunctions, ScanBufferingMode scanBufferingMode)
        {
            using BlittableScanIterator<Key, Value> iter = new(store, this, beginAddress, endAddress, scanBufferingMode, epoch, logger: logger);
            return PushScanImpl(store, beginAddress, endAddress, ref scanFunctions, iter);
        }

        /// <summary>

View on GitHub (pinned to 321d872eab)