{"record":{"id":"39fe3b1102dbb8b0","repo":"hyperledger/fabric","slug":"the-following-existing-collections-are-missing-in","errorCode":null,"errorMessage":"the following existing collections are missing in the new collection configuration package: %v","messagePattern":"the following existing collections are missing in the new collection configuration package: (.+?)","errorType":"validation","errorClass":"VSCCEndorsementPolicyError","httpStatus":null,"severity":"error","filePath":"core/handlers/validation/builtin/v12/validation_logic.go","lineNumber":288,"sourceCode":"\t// number of new collections are allowed.\n\tfor _, oldCollectionConfig := range oldCollectionConfigs {\n\n\t\toldCollection := oldCollectionConfig.GetStaticCollectionConfig()\n\t\t// It cannot be nil\n\t\tif oldCollection == nil {\n\t\t\treturn policyErr(fmt.Errorf(\"unknown collection configuration type\"))\n\t\t}\n\n\t\t// All old collection must exist in the new collection config package\n\t\toldCollectionName := oldCollection.GetName()\n\t\t_, ok := newCollectionsMap[oldCollectionName]\n\t\tif !ok {\n\t\t\tmissingCollections = append(missingCollections, oldCollectionName)\n\t\t}\n\t}\n\n\tif len(missingCollections) > 0 {\n\t\treturn policyErr(fmt.Errorf(\"the following existing collections are missing in the new collection configuration package: %v\",\n\t\t\tmissingCollections))\n\t}\n\n\treturn nil\n}\n\nfunc checkForModifiedCollectionsBTL(newCollectionsMap map[string]*pb.StaticCollectionConfig, oldCollectionConfigs []*pb.CollectionConfig,\n) error {\n\tvar modifiedCollectionsBTL []string\n\n\t// In the new collection config package, ensure that the block to live value is not\n\t// modified for the existing collections.\n\tfor _, oldCollectionConfig := range oldCollectionConfigs {\n\n\t\toldCollection := oldCollectionConfig.GetStaticCollectionConfig()\n\t\t// It cannot be nil\n\t\tif oldCollection == nil {\n\t\t\treturn policyErr(fmt.Errorf(\"unknown collection configuration type\"))","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/handlers/validation/builtin/v12/validation_logic.go#L270-L306","documentation":"checkForMissingCollections compared old and new collection configs during an upgrade and found existing collections absent from the new package — collections cannot be dropped once deployed; they can only be added.","triggerScenarios":"Thrown at core/handlers/validation/builtin/v12/validation_logic.go:288 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include all previously defined collections in the upgrade's collection config","Append new collections rather than replacing the whole list"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}