Skip to content

Fixed read conditions in IOperationDocumentStorage implementations#9064

Merged
glen-84 merged 2 commits intomainfrom
gai/fix-read-conditions
Jan 28, 2026
Merged

Fixed read conditions in IOperationDocumentStorage implementations#9064
glen-84 merged 2 commits intomainfrom
gai/fix-read-conditions

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Jan 26, 2026

Summary of the changes (Less than 80 chars)

  • Fixed read conditions in IOperationDocumentStorage implementations.

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
5806.30 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.78ms 7.13ms 162.71ms 8.46ms 13.01ms 18.76ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
4516.45 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.84ms 38.84ms 245.94ms 49.04ms 110.18ms 126.78ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
      }
    }
  }
}

Deep Recursion Query

Constant Load (50 VUs)

Requests/sec Error Rate
267.44 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
12.65ms 175.15ms 590.40ms 181.22ms 225.12ms 250.94ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
296.31 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
3.11ms 709.64ms 1661.18ms 710.57ms 1433.15ms 1505.00ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  users {
    ...User
    reviews {
      ...Review
      product {
        ...Product
        reviews {
          ...Review
          author {
            ...User
            reviews {
              ...Review
              product {
                ...Product
              }
            }
          }
        }
      }
    }
  }
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
        reviews {
          ...Review
          product {
            ...Product
          }
        }
      }
    }
  }
}

Variable Batching Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
24105.26 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.67ms 45.68ms 2.02ms 3.84ms 4.71ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
18763.29 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 9.21ms 107.37ms 11.24ms 23.17ms 28.09ms

Executed Query

query TestQuery_8f7a46ce_2(
  $__fusion_1_upc: ID!
  $__fusion_2_price: Long!
  $__fusion_2_weight: Long!
) {
  productByUpc(upc: $__fusion_1_upc) {
    inStock
    shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
  }
}

Variables (5 sets batched in single request)

[
  { "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
  { "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
  { "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]

No baseline data available for comparison.


Run 21359887396 • Commit ecc3be9 • Mon, 26 Jan 2026 14:03:19 GMT

@glen-84 glen-84 requested a review from PascalSenn January 27, 2026 07:59
Copilot AI review requested due to automatic review settings January 28, 2026 09:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes critical bugs in stream reading logic across two IOperationDocumentStorage implementations. The changes correct improper end-of-stream detection that could cause incorrect behavior when reading persisted GraphQL operation documents.

Changes:

  • Fixed FileSystemOperationDocumentStorage to use the correct stream reading pattern (checking for read != 0 instead of read == chunkSize)
  • Fixed AzureBlobOperationDocumentStorage to properly detect EOF (checking for read == 0 instead of read < 256) and modernized to use Memory API
  • Both changes eliminate bugs where the old code made incorrect assumptions about Stream.ReadAsync behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
FileSystemOperationDocumentStorage.cs Corrected stream reading loop to check for EOF properly and removed unnecessary initialization of read variable
AzureBlobOperationDocumentStorage.cs Fixed EOF detection logic and modernized to use Memory-based ReadAsync overload

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@glen-84 glen-84 removed the request for review from PascalSenn January 28, 2026 09:43
@glen-84 glen-84 merged commit f07b78b into main Jan 28, 2026
121 of 122 checks passed
@glen-84 glen-84 deleted the gai/fix-read-conditions branch January 28, 2026 09:43
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (e92dbb7) to head (9e86641).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #9064   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
5768.60 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.80ms 7.16ms 163.39ms 8.51ms 13.30ms 18.80ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
4630.95 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.81ms 38.18ms 272.14ms 47.84ms 105.35ms 126.08ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
      }
    }
  }
}

Deep Recursion Query

Constant Load (50 VUs)

Requests/sec Error Rate
269.93 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
13.00ms 174.88ms 612.17ms 179.64ms 224.26ms 247.17ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
301.57 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
3.09ms 664.32ms 1710.73ms 700.71ms 1415.35ms 1505.15ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  users {
    ...User
    reviews {
      ...Review
      product {
        ...Product
        reviews {
          ...Review
          author {
            ...User
            reviews {
              ...Review
              product {
                ...Product
              }
            }
          }
        }
      }
    }
  }
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
        reviews {
          ...Review
          product {
            ...Product
          }
        }
      }
    }
  }
}

Variable Batching Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
23604.40 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.71ms 44.09ms 2.07ms 3.92ms 4.80ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
18912.43 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 9.11ms 109.90ms 11.19ms 23.08ms 27.90ms

Executed Query

query TestQuery_8f7a46ce_2(
  $__fusion_1_upc: ID!
  $__fusion_2_price: Long!
  $__fusion_2_weight: Long!
) {
  productByUpc(upc: $__fusion_1_upc) {
    inStock
    shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
  }
}

Variables (5 sets batched in single request)

[
  { "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
  { "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
  { "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]

No baseline data available for comparison.


Run 21432329220 • Commit b1bd3db • Wed, 28 Jan 2026 10:03:19 GMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants