Skip to content

Redundant instance name subdirectories in var/ structure #1210

@kajr0s

Description

@kajr0s

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

  1. Redundancy: Instance name is already specified at the top level (instances.enabled/myapp/)
  2. Simplicity: Shorter paths are easier to navigate and understand
  3. Consistency: Other tools don't typically create nested subdirectories with the same name
  4. 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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions