Skip to content

Commit

Permalink
Fix concurrent map write
Browse files Browse the repository at this point in the history
  • Loading branch information
irees committed Dec 6, 2024
1 parent 7b5d4f0 commit 0719718
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion cmd/tlserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func (cmd *ServerCommand) AddFlags(fl *pflag.FlagSet) {
fl.BoolVar(&cmd.LoadAdmins, "load-admins", false, "Load admin polygons from database into memory")
fl.IntVar(&cmd.LoaderBatchSize, "loader-batch-size", 100, "GraphQL Loader batch size")
fl.IntVar(&cmd.LoaderStopTimeBatchSize, "loader-stop-time-batch-size", 1, "GraphQL Loader batch size for StopTimes")

}

func (cmd *ServerCommand) Parse(args []string) error {
Expand Down
2 changes: 2 additions & 0 deletions internal/clock/swcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ func (f *ServiceWindowCache) Get(ctx context.Context, fvid int) (ServiceWindow,
}

// Add to cache
f.lock.Lock()
f.fvslWindows[fvid] = a
f.lock.Unlock()
return a, true, err
}

Expand Down

0 comments on commit 0719718

Please sign in to comment.