You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Concurrent data branch operations on different CN nodes cause visibility race condition:
cn2: data branch create database exp_no_gate_182841988883 (txn afe68)
cn1: data branch create table exp_no_gate_182841988883.agent_events (txn bfc7)
cn1's snapshot TS (1773858521993681333) is ~6ms earlier than cn2's commit TS (1773858521999921877), so cn1's transaction cannot see the newly created database.
Error Chain
cn2: create database exp_no_gate_182841988883 commits at TS 1773858521999921877
cn1: txn with snapshot TS 1773858521993681333 tries to access the database
Engine.Database() returns ExpectedEOB (database not found in snapshot view)
getSubscriptionMeta wraps all errors into moerr.NewNoDB(ctx)
User sees misleading "No database selected" instead of visibility issue
Root Cause
Snapshot Timestamp Too Early: cn1's transaction snapshot predates the database commit
ExpectedEOB Misleading Error: publication_subscription.go:1630 converts all errors to "No database selected"
Missing Retry Logic: No mechanism to retry when database becomes visible
Code Issue
// publication_subscription.go:1630
dbMeta, err := getPu(ses.GetService()).StorageEngine.Database(ctx, dbName, txn)
if err != nil {
ses.Errorf(ctx, "Get Subscription database %s meta error: %s", dbName, err.Error())
return nil, moerr.NewNoDB(ctx) // ← Wrong: converts ExpectedEOB to "No database selected"
}
Suggested Fix
Distinguish between "database does not exist" (ExpectedEOB) and "no database selected" (NewNoDB)
Add retry logic when database is not yet visible in snapshot
Or ensure data branch create table waits until target database is visible
Activity
fix(frontend): make getSubscriptionMeta lenient on database access er…
fix(frontend): make getSubscriptionMeta lenient and handle ExpectedEO…
fix(frontend): make getSubscriptionMeta lenient and handle ExpectedEO…
fix(frontend): handle ExpectedEOB in getSubscriptionMeta and getRelat…