Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Remove page-view tracking

0a12642f6c01236d1fbd4ee06aaa2bd2283c6bf0 · Keenan Nemetz · 3d ago · parent 8f6548a6

Remove page-view tracking

Counting a page wrote a row to instance.db on every successful HTML GET, so
reading the instance contended with CI and the merge worker for the one
write lock. The counters answered one status page and were not part of what
a restore has to keep, so the feature is gone rather than moved.

The status overview loses its page-view card and table; the rest of the
Admin page is unchanged. An instance that recorded views keeps the old
page_views table in instance.db, which nothing reads.

Refs #398

server/server.go +12−18

@@ -22,7 +22,6 @@ import (
22 22 "rodent.software/vole/forge/identity"
23 23 "rodent.software/vole/forge/index"
24 24 "rodent.software/vole/forge/instancerepo"
25 "rodent.software/vole/forge/pageview"
26 25 "rodent.software/vole/forge/repo"
27 26 "rodent.software/vole/forge/secret"
28 27 "rodent.software/vole/forge/session"
@@ -35,18 +34,17 @@ import (
35 34 )
36 35
37 36 type Server struct {
38 ctx context.Context
39 cancel context.CancelFunc
40 Cfg *config.Config
41 Repos *repo.Store
42 Identity *identity.Store
43 Sessions *session.Store
44 Runs *runs.Store
45 Index *index.Store
46 Channels *channel.Store
47 LFS *lfs.Store
48 Locks *lfs.LockStore
49 PageViews *pageview.Store
37 ctx context.Context
38 cancel context.CancelFunc
39 Cfg *config.Config
40 Repos *repo.Store
41 Identity *identity.Store
42 Sessions *session.Store
43 Runs *runs.Store
44 Index *index.Store
45 Channels *channel.Store
46 LFS *lfs.Store
47 Locks *lfs.LockStore
50 48 // InstanceRepo is the repository whose tree customizes the instance.
51 49 InstanceRepo *instancerepo.Store
52 50 // Secrets is the per-repository store behind the settings page and the
@@ -178,7 +176,6 @@ func New(cfg *config.Config, binPath string, log *slog.Logger) (*Server, error)
178 176 wp.LFS = inst.LFS
179 177 wp.Locks = inst.Locks
180 178 wp.Sessions = inst.Sessions
181 wp.PageViews = inst.PageViews
182 179 wp.InstanceRepo = inst.InstanceRepo
183 180 wp.Secrets = inst.Secrets
184 181 wp.ChannelStore = inst.Channels
@@ -195,7 +192,7 @@ func New(cfg *config.Config, binPath string, log *slog.Logger) (*Server, error)
195 192 s := &Server{
196 193 Cfg: cfg, Repos: inst.Repos, Identity: inst.Identity, Sessions: inst.Sessions,
197 194 Runs: inst.Runs, Index: inst.Index, Channels: inst.Channels, acme: acme,
198 LFS: inst.LFS, Locks: inst.Locks, PageViews: inst.PageViews, Secrets: inst.Secrets,
195 LFS: inst.LFS, Locks: inst.Locks, Secrets: inst.Secrets,
199 196 Proxy: proxy, SSH: ssh, SSHSessions: sshSessions, Web: wp, Log: log,
200 197 metadataWake: make(chan struct{}, 1),
201 198 autoMergeWake: make(chan struct{}, 1),
@@ -544,9 +541,6 @@ func (s *Server) Close() error {
544 541 if s.Locks != nil {
545 542 _ = s.Locks.Close()
546 543 }
547 if s.PageViews != nil {
548 _ = s.PageViews.Close()
549 }
550 544 if s.Index != nil {
551 545 if err := s.Index.Close(); err != nil {
552 546 return err