metadata_store.go ×5

Frontier kind: Code frontier

unlabeled · c_bcfb7c319232

4 tests · 4877 LOC · 205 files · introduces 0 tests · 14 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges14 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
924 ranges4877 lines · 205 files · Browse complete extent
All tests (intent)
4 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 14 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/cassandra/metadata_store.go 14 introduced LOC · 5 ranges

Open complete file

161
162 if !applied {
164 > // if both conditions fail, find the one related to the first query
165 > matched, err := hasNameConflict(previous, "name", request.Name)
166 > if err != nil {
167 return nil, err
168 }
169 > if !matched { metadata_store.go
170 m := make(map[string]any)
171 if iter.MapScan(m) {
175
176 // if conditional failure is due to a duplicate name in namespaces table
177 > matched, err = hasNameConflict(previous, "name", request.Name) metadata_store.go
178 > if err != nil {
179 return nil, err
180 }
181 > if matched { metadata_store.go
182 > var existingID string
183 > if id, ok := previous["id"]; ok {
184 > existingID = gocql.UUIDToString(id)
185 > if existingID != request.ID {
186 // Delete orphan namespace record before returning back to user
187 deleteOrphanNamespace()
189 }
190
191 > msg := fmt.Sprintf("Namespace already exists. Name: %q, NamespaceId: %v", request.Name, existingID) metadata_store.go
192 > return nil, serviceerror.NewNamespaceAlreadyExists(msg)
193
194 }