-
Couldn't load subscription status.
- Fork 15
Open
Description
Problem
The current tt 2.0+ directory structure creates unnecessary nesting by duplicating instance names inside the var/ directory:
instances.enabled/
└── myapp/ # Instance name
└── var/
├── lib/
│ └── myapp/ # ← Redundant duplication
│ ├── *.snap
│ └── *.xlog
├── log/
│ └── myapp/ # ← Redundant duplication
│ ├── tt.log
│ └── tarantool.log
└── run/
└── myapp/ # ← Redundant duplication
├── tarantool.pid
└── tarantool.control
Expected behavior
Since each instance already has its own isolated directory under instances.enabled/, the instance name should not be duplicated inside var/ subdirectories:
instances.enabled/
└── myapp/ # Instance name (sufficient isolation)
└── var/
├── lib/ # ← Direct data files
│ ├── *.snap
│ └── *.xlog
├── log/ # ← Direct log files
│ ├── tt.log
│ └── tarantool.log
└── run/ # ← Direct runtime files
├── tarantool.pid
└── tarantool.control
Rationale
- Redundancy: Instance name is already specified at the top level (
instances.enabled/myapp/) - Simplicity: Shorter paths are easier to navigate and understand
- Consistency: Other tools don't typically create nested subdirectories with the same name
- Migration pain: Current structure makes file paths unnecessarily long and confusing
Configuration impact
This would also simplify box.cfg paths:
Current (redundant):
box.cfg {
wal_dir = 'var/lib/myapp',
memtx_dir = 'var/lib/myapp',
log = 'var/log/myapp/tarantool.log'
}Proposed (clean):
box.cfg {
wal_dir = 'var/lib',
memtx_dir = 'var/lib',
log = 'var/log/tarantool.log'
}Environment
- tt version: 2.x+
- OS: Any
Suggested solution
Remove the instance name subdirectories from var/lib/, var/log/, and var/run/ paths, storing files directly in these directories since instance isolation is already provided by the parent directory structure.
Metadata
Metadata
Assignees
Labels
No labels