Skip to content

fix cluster advisory lock collisions across shard groups#2199

Open
mikearnaldi wants to merge 3 commits into
mainfrom
fix/pg-shard-lock-collision
Open

fix cluster advisory lock collisions across shard groups#2199
mikearnaldi wants to merge 3 commits into
mainfrom
fix/pg-shard-lock-collision

Conversation

@mikearnaldi
Copy link
Copy Markdown
Member

Summary

  • derive PostgreSQL shard advisory locks from the canonical shard id with hashtextextended(..., 1337) so disjoint shard groups no longer collide across runners
  • add a regression test covering two runners that use different shard groups against the same Postgres storage
  • export the workspace @effect/oxc oxlint plugin from built dist files so pnpm lint-fix works under plain Node

Testing

  • pnpm lint-fix
  • pnpm test packages/platform-node/test/cluster/SqlRunnerStorage.test.ts
  • pnpm check:tsgo

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 16, 2026

🦋 Changeset detected

Latest commit: 7146854

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
effect Patch
@effect/opentelemetry Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/vitest Patch
@effect/ai-anthropic Patch
@effect/ai-openai-compat Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/openapi-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

📊 JSDoc Documentation Analysis

📈 Current Analysis Results
Analyzing 136 TypeScript files in packages/effect/src/ (including schema and config subdirectories)...

============================================================
         EFFECT JSDOC ANALYSIS REPORT
============================================================

📊 SUMMARY STATISTICS
------------------------------
Total files analyzed: 136
Total exported members: 4318
Missing @example: 2186 (50.6%)
Missing @category: 397 (9.2%)

🎯 TOP FILES NEEDING ATTENTION
----------------------------------------
1. Schema.ts
   📝 520 missing examples, 🏷️  203 missing categories
   📦 520 total exports
2. Array.ts
   📝 135 missing examples, 🏷️  2 missing categories
   📦 140 total exports
3. SchemaRepresentation.ts
   📝 96 missing examples, 🏷️  12 missing categories
   📦 96 total exports
4. SchemaAST.ts
   📝 77 missing examples, 🏷️  21 missing categories
   📦 77 total exports
5. Cause.ts
   📝 79 missing examples, 🏷️  2 missing categories
   📦 79 total exports
6. Channel.ts
   📝 81 missing examples, 🏷️  0 missing categories
   📦 152 total exports
7. SchemaTransformation.ts
   📝 43 missing examples, 🏷️  31 missing categories
   📦 43 total exports
8. Option.ts
   📝 67 missing examples, 🏷️  3 missing categories
   📦 67 total exports
9. Sink.ts
   📝 64 missing examples, 🏷️  2 missing categories
   📦 81 total exports
10. Predicate.ts
   📝 57 missing examples, 🏷️  0 missing categories
   📦 57 total exports
11. SchemaGetter.ts
   📝 51 missing examples, 🏷️  0 missing categories
   📦 51 total exports
12. Result.ts
   📝 47 missing examples, 🏷️  0 missing categories
   📦 47 total exports
13. Config.ts
   📝 35 missing examples, 🏷️  6 missing categories
   📦 35 total exports
14. Types.ts
   📝 39 missing examples, 🏷️  0 missing categories
   📦 39 total exports
15. Effect.ts
   📝 32 missing examples, 🏷️  2 missing categories
   📦 253 total exports

✅ PERFECTLY DOCUMENTED FILES
-----------------------------------
   Chunk.ts (86 exports)
   Clock.ts (5 exports)
   FiberHandle.ts (15 exports)
   FiberMap.ts (19 exports)
   FiberSet.ts (14 exports)
   HKT.ts (4 exports)
   HashMap.ts (44 exports)
   HashSet.ts (21 exports)
   Match.ts (57 exports)
   MutableRef.ts (17 exports)
   NonEmptyIterable.ts (3 exports)
   Random.ts (9 exports)
   Redacted.ts (9 exports)
   RegExp.ts (3 exports)
   Symbol.ts (1 exports)
   Trie.ts (29 exports)
   TxChunk.ts (22 exports)
   TxDeferred.ts (7 exports)
   TxHashMap.ts (41 exports)
   TxHashSet.ts (24 exports)
   TxPriorityQueue.ts (19 exports)
   TxReentrantLock.ts (17 exports)
   TxRef.ts (7 exports)
   TxSemaphore.ts (14 exports)
   TxSubscriptionRef.ts (12 exports)
   Unify.ts (8 exports)
   index.ts (0 exports)

🔍 SAMPLE MISSING ITEMS FROM Schema.ts
-----------------------------------
   Optionality (type, line 150): missing example, category
   Mutability (type, line 159): missing example, category
   ConstructorDefault (type, line 169): missing example, category
   MakeOptions (interface, line 183): missing example, category
   Bottom (interface, line 211): missing example, category
   declareConstructor (interface, line 269): missing example
   declareConstructor (function, line 333): missing example
   declare (interface, line 360): missing example
   declare (function, line 393): missing example
   revealBottom (function, line 433): missing example, category

📋 BREAKDOWN BY EXPORT TYPE
-----------------------------------
const: 1127 missing examples, 114 missing categories
interface: 348 missing examples, 91 missing categories
type: 253 missing examples, 79 missing categories
function: 353 missing examples, 93 missing categories
namespace: 47 missing examples, 20 missing categories
class: 58 missing examples, 0 missing categories

📈 DOCUMENTATION PROGRESS
------------------------------
Examples: 2132/4318 (49.4% complete)
Categories: 3921/4318 (90.8% complete)

============================================================
Analysis complete! 2583 items need attention.
============================================================

📄 Detailed results saved to: jsdoc-analysis-results.json

This comment is automatically updated on each push. View the analysis script for details.

@github-actions
Copy link
Copy Markdown
Contributor

Bundle Size Analysis

File Name Current Size Previous Size Difference
basic.ts 6.72 KB 6.72 KB 0.00 KB (0.00%)
batching.ts 9.22 KB 9.22 KB 0.00 KB (0.00%)
brand.ts 6.20 KB 6.20 KB 0.00 KB (0.00%)
cache.ts 9.70 KB 9.70 KB 0.00 KB (0.00%)
config.ts 18.40 KB 18.40 KB 0.00 KB (0.00%)
differ.ts 16.85 KB 16.85 KB 0.00 KB (0.00%)
http-client.ts 20.15 KB 20.15 KB 0.00 KB (0.00%)
logger.ts 10.18 KB 10.18 KB 0.00 KB (0.00%)
metric.ts 8.56 KB 8.56 KB 0.00 KB (0.00%)
optic.ts 7.37 KB 7.37 KB 0.00 KB (0.00%)
pubsub.ts 13.80 KB 13.80 KB 0.00 KB (0.00%)
queue.ts 11.08 KB 11.08 KB 0.00 KB (0.00%)
schedule.ts 10.08 KB 10.08 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 26.17 KB 26.17 KB 0.00 KB (0.00%)
schema-string-transformation.ts 12.59 KB 12.59 KB 0.00 KB (0.00%)
schema-string.ts 10.34 KB 10.34 KB 0.00 KB (0.00%)
schema-template-literal.ts 13.94 KB 13.94 KB 0.00 KB (0.00%)
schema-toArbitraryLazy.ts 18.44 KB 18.44 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 21.12 KB 21.12 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 17.66 KB 17.66 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 17.61 KB 17.61 KB 0.00 KB (0.00%)
schema-toFormatter.ts 17.44 KB 17.44 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 19.96 KB 19.96 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 18.00 KB 18.00 KB 0.00 KB (0.00%)
schema.ts 17.05 KB 17.05 KB 0.00 KB (0.00%)
stm.ts 11.95 KB 11.95 KB 0.00 KB (0.00%)
stream.ts 9.25 KB 9.25 KB 0.00 KB (0.00%)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant