{"record":{"id":"0995e16e61668308","repo":"vitessio/vitess","slug":"there-are-no-cells-in-the-topo","errorCode":null,"errorMessage":"there are no cells in the topo","messagePattern":"there are no cells in the topo","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vttablet/tabletmanager/vdiff/action.go","lineNumber":176,"sourceCode":"\tif targetCell == \"\" { // Default is all cells\n\t\ttargetCell = defaultCell\n\t}\n\toptions.PickerOptions.SourceCell = sourceCell\n\toptions.PickerOptions.TargetCell = targetCell\n\n\treturn options, nil\n}\n\n// getDefaultCell returns all of the cells in the topo as a comma\n// separated string as the default value is all available cells.\nfunc (vde *Engine) getDefaultCell() (string, error) {\n\tcells, err := vde.ts.GetCellInfoNames(vde.ctx)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif len(cells) == 0 {\n\t\t// Unreachable\n\t\treturn \"\", errors.New(\"there are no cells in the topo\")\n\t}\n\tsort.Strings(cells) // Ensure that the resulting value is deterministic\n\treturn strings.Join(cells, \",\"), nil\n}\n\nfunc (vde *Engine) handleCreateResumeAction(ctx context.Context, dbClient binlogplayer.DBClient, action VDiffAction, req *tabletmanagerdatapb.VDiffRequest, resp *tabletmanagerdatapb.VDiffResponse) error {\n\tvar qr *sqltypes.Result\n\toptions := req.GetOptions()\n\n\tquery, err := sqlparser.ParseAndBind(sqlGetVDiffID, sqltypes.StringBindVariable(req.VdiffUuid), sqltypes.StringBindVariable(vde.dbName))\n\tif err != nil {\n\t\treturn err\n\t}\n\tif qr, err = dbClient.ExecuteFetch(query, 1); err != nil {\n\t\treturn err\n\t}\n\trecordFound := len(qr.Rows) == 1\n","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vttablet/tabletmanager/vdiff/action.go#L158-L194","documentation":"This error is thrown by the vdiff Engine's getDefaultCell when the topology server returns an empty list of cell names. getDefaultCell is called by fixupOptions to pick a default 'cells' value for a vdiff operation, so if no cells are registered in the topo the operation cannot proceed. The code marks it 'Unreachable' because a running Vitess cluster should always have at least one cell.","triggerScenarios":"Calling a vdiff action (create/resume via fixupOptions) without an explicit 'cells' option when ts.GetCellInfoNames returns zero cells — i.e. the topo has no registered cells.","commonSituations":"Running vttablet/vdiff against a misconfigured or nearly-empty topo server (e.g. etcd2 Consul namespace pointing at the wrong prefix); topo server connectivity problems that mask real cells; test environments with a topo that has no cells registered.","solutions":["Pass an explicit 'cells' value in the vdiff request so getDefaultCell is never consulted","Verify cells are registered: run vtctl GetCellInfoNames (or the equivalent topo client call) against the same topo server/port the tablet uses","Check the tablet's topo flags (-topo_implementation, -topo_global_server_address, -topo_global_root) point at the real cluster topo, not an empty one","Register the missing cells in the topo (vtctl AddCellInfo)"],"exampleFix":"// before\nVReplicationExec(\"vdiff create\", true) // fails: no cells in topo\n// after\nVReplicationExec(\"vdiff create --cells=zone1\", true) // explicit cells bypass default lookup","handlingStrategy":"validation","validationCode":"cells, err := ts.GetCellInfoNames(ctx)\nif err != nil || len(cells) == 0 {\n    return fmt.Errorf(\"topo has no cells; specify cells explicitly or fix topo config\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass an explicit cells list in vdiff options","Verify topo flags point at the cluster's real topo before running vdiff","Run vtctl GetCellInfoNames as a preflight in scripts"],"tags":["topo","vdiff","configuration"],"backgroundTag":"empty-topo-cells","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}