Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.0.0, 7.17.0
-
2
-
Severity 3 - Minor
-
3
-
Description
Issue Summary
This is reproducible on Data Center: yes
If repositories are created on an additional data storage according to Adding additional storage for your repository data because the original shared directory either:
- was running out of space and could not be extended
- was running out of inodes
- hit a link limit (number of subdirectories that can be created in a directory)
Jira Issues keys will not be indexed for new repositories created on the new storage because the shared/data/snapshots directory remains on the original shared storage (which has the link limit).
This has the following consequences:
- The Issues column in the commits page will not be populated
- Commits with a jira issue key will not appear on the development panel in Jira.
This is due to the fact that the snapshots directory required for indexing Jira keys has the following hierarchy:
$BITBUCKET_HOME/shared/data/snapshots
and thus stays on the original shared.
The new storage only holds new repositories in
$BITBUCKET_HOME/shared_new/data/repositories
and does not include a snapshots directory
Steps to Reproduce
- Add an additional storage for repos
- Have an original shared disk that matches any of the 3 conditions listed above
Expected Results
For new repositories created in the new storage, Jira issue keys should be indexed.
Actual Results
For new repositories created in the new storage, Jira issue keys are not indexed.
For the use case of too many links:
The below exception is thrown in the atlassian-bitbucket.log file:
ERROR [commit-indexing:thread-3] c.a.s.internal.idx.HierarchyIndexer [PROJECT/repo[id]] Indexing failed java.lang.IllegalStateException: Could not create $BITBUCKET_HOME/shared/data/snapshots/<id> at com.atlassian.bitbucket.util.MoreFiles.mkdir(MoreFiles.java:271) at com.atlassian.bitbucket.util.MoreFiles.mkdir(MoreFiles.java:294) at com.atlassian.stash.internal.idx.FileSystemRepositorySnapshotService.getSnapshotDir(FileSystemRepositorySnapshotService.java:191) ... Caused by: java.nio.file.FileSystemException: $BITBUCKET_HOME/shared/data/snapshots/<id>: Too many links
Workaround
Create a new mount on a filesystem that supports more link nodes and mount it at $BITBUCKET_HOME/shared/data/snapshots