You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DDEV has been very successful in using mutagen, and people love it. Thanks!
DDEV currently uses mutagen 0.17.2, and the classic environment is macOS filesystem as the alpha, and a docker container as the beta, actually syncing to a mounted docker volume.
In exploring a user's issues with polling inside the container, ddev/ddev#6286
I happened to discover behavior that was unexpected. I was using the ddev mutagen logs feature, which wraps mutagen daemon run with MUTAGEN_LOG_LEVEL=trace and I notice that files in ignored directories still cause mutagen to do things.
The key example is the .git directory of the project. I happened to do a git status on the host (alpha) and I see 2024-06-07 10:37:16.294341 [T] [sync.sync_06rS9JYw.alpha.watching] Processing event path: ".git/index.lock"
Further exploration showed that all git activities were monitored on the alpha.
#ddev-generated
# To override this file remove the line above
# and add your own configuration. If you override it you will
# probably want to check it in.
# Please do `ddev mutagen reset` after changing the file.
# See DDEV Mutagen docs at
# https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
# For detailed information about mutagen configuration options, see
# https://mutagen.io/documentation/introduction/configuration
sync:
defaults:
mode: "two-way-resolved"
stageMode: "neighboring"
ignore:
paths:
# The top-level .git directory is ignored because where possible it's
# mounted into the container with a traditional docker bind-mount
- "/.git"
- "/.tarballs"
- "/.ddev/db_snapshots"
- "/.ddev/.importdb*"
- ".DS_Store"
- ".idea"
- "/web/sites/default/files"
# You can also exclude other directories from mutagen-syncing
# For example /var/www/html/var does not need to sync in TYPO3
# so you can add:
# - "/var"
# vcs like .git can be ignored for safety, but then some
# composer operations may fail if they use dev versions/git.
# vcs: true
symlink:
mode: "posix-raw"
Trace content from git status:
Related trace content of git status
2024-06-07 10:42:13.734636 [T] [sync.sync_06rS9JYw.alpha.watching] Processing event path: ".git/index.lock"
2024-06-07 10:42:13.755793 [D] [sync.sync_06rS9JYw] Triggered by alpha endpoint
2024-06-07 10:42:13.757442 [D] [sync.sync_06rS9JYw] Scanning endpoints
2024-06-07 10:42:13.757498 [D] [sync.sync_06rS9JYw.beta] Using last snapshot bytes as baseline
2024-06-07 10:42:13.757500 [D] [sync.sync_06rS9JYw.alpha] Performing accelerated scan with 1 recheck paths
2024-06-07 16:42:13.773050 [D] [sync.sync_06rS9JYw.beta] Performing accelerated scan with existing snapshot
2024-06-07 10:42:13.777443 [D] [sync.sync_06rS9JYw.alpha] Saving cache to disk
2024-06-07 10:42:13.781882 [D] [sync.sync_06rS9JYw.beta] Snapshot delta yielded 1552043 bytes using 1 block operation(s) and 0 data operation(s) totaling 0 byte(s)
2024-06-07 10:42:13.802882 [T] [sync.sync_06rS9JYw] Ancestor contains 34845 entries, alpha contains 34845 entries, beta contains 34845 entries
2024-06-07 10:42:13.809974 [D] [sync.sync_06rS9JYw] Performing reconciliation
2024-06-07 10:42:13.894223 [T] [sync.sync_06rS9JYw.alpha.watching] Processing event path: ".git/index.lock"
2024-06-07 10:42:13.915310 [D] [sync.sync_06rS9JYw] Triggered by alpha endpoint
2024-06-07 10:42:13.916726 [D] [sync.sync_06rS9JYw] Scanning endpoints
2024-06-07 10:42:13.916761 [D] [sync.sync_06rS9JYw.beta] Using last snapshot bytes as baseline
2024-06-07 10:42:13.916775 [D] [sync.sync_06rS9JYw.alpha] Performing accelerated scan with 1 recheck paths
2024-06-07 16:42:13.932496 [D] [sync.sync_06rS9JYw.beta] Performing accelerated scan with existing snapshot
2024-06-07 10:42:13.943909 [D] [sync.sync_06rS9JYw.beta] Snapshot delta yielded 1552043 bytes using 1 block operation(s) and 0 data operation(s) totaling 0 byte(s)
2024-06-07 10:42:13.964937 [T] [sync.sync_06rS9JYw] Ancestor contains 34845 entries, alpha contains 34845 entries, beta contains 34845 entries
2024-06-07 10:42:13.971238 [D] [sync.sync_06rS9JYw] Performing reconciliation
2024-06-07 16:42:16.468898 [D] [sync.sync_06rS9JYw.beta] [polling] Received timer-based polling signal
2024-06-07 16:42:16.469037 [D] [sync.sync_06rS9JYw.beta] [polling] Performing filesystem scan
2024-06-07 16:42:16.603449 [D] [sync.sync_06rS9JYw.beta] [polling] Accelerated scanning now available
2024-06-07 16:42:16.614291 [D] [sync.sync_06rS9JYw.beta] [polling] No unignored modifications detected
Does the alpha actually monitor things and ignore them? Is that what's going on here? It seems like unexpected work.
The text was updated successfully, but these errors were encountered:
DDEV has been very successful in using mutagen, and people love it. Thanks!
DDEV currently uses mutagen 0.17.2, and the classic environment is macOS filesystem as the alpha, and a docker container as the beta, actually syncing to a mounted docker volume.
In exploring a user's issues with polling inside the container, ddev/ddev#6286
I happened to discover behavior that was unexpected. I was using the
ddev mutagen logs
feature, which wrapsmutagen daemon run
withMUTAGEN_LOG_LEVEL=trace
and I notice that files in ignored directories still cause mutagen to do things.The key example is the .git directory of the project. I happened to do a
git status
on the host (alpha) and I see2024-06-07 10:37:16.294341 [T] [sync.sync_06rS9JYw.alpha.watching] Processing event path: ".git/index.lock"
Further exploration showed that all git activities were monitored on the alpha.
Here's the description of the sync session:
Sync session in use
Here's the mutagen.yml:
mutagen.yml contents
Trace content from
git status
:Related trace content of git status
Does the alpha actually monitor things and ignore them? Is that what's going on here? It seems like unexpected work.
The text was updated successfully, but these errors were encountered: