Discussion:
small bug in create-missing-checksums consumer
Isabelle Guimiot
2015-03-19 10:11:38 UTC
Permalink
Hi,

I noticed that checksum files were always created again on all the
artifacts during each repo scanning. In the log, I could see messages like :

Created missing checksum file
/archiva_install/repositories/internal/com/company/project/myjar/1.2/myjar-1.2.jarsha1

There's a dot missing at the end of the path, should be myjar-1.2.jar.sha1
instead of myjar-1.2.jarsha1 , and I think this issue comes from this line
in the code, file ArtifactMissingChecksumsConsumer.java :

File checksumFile = new File( this.repositoryDir, path +
checksumAlgorithm[0].getExt() );

It should be :

File checksumFile = new File( this.repositoryDir, path + "." +
checksumAlgorithm[0].getExt() );

Because without the dot, it doesn't find the checksum file, wrongly thinks
it's missing, and re-creates it ! It's not a blocker bug, but it slows down
large repos scanning...

Need a jira for this ?

Thanks !

Isabelle
Olivier Lamy
2015-03-22 23:49:54 UTC
Permalink
Post by Isabelle Guimiot
Hi,
I noticed that checksum files were always created again on all the
Created missing checksum file
/archiva_install/repositories/internal/com/company/project/myjar/1.2/myjar-1.2.jarsha1
There's a dot missing at the end of the path, should be myjar-1.2.jar.sha1
instead of myjar-1.2.jarsha1 , and I think this issue comes from this line
File checksumFile = new File( this.repositoryDir, path +
checksumAlgorithm[0].getExt() );
File checksumFile = new File( this.repositoryDir, path + "." +
checksumAlgorithm[0].getExt() );
Because without the dot, it doesn't find the checksum file, wrongly thinks
it's missing, and re-creates it ! It's not a blocker bug, but it slows down
large repos scanning...
Sounds definitely a bug :-)
Post by Isabelle Guimiot
Need a jira for this ?
Yes please (just to have a reminder :-) )
Post by Isabelle Guimiot
Thanks !
Isabelle
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Olivier Lamy
2015-03-23 03:33:43 UTC
Permalink
so I had a bit of time and fixed that.
Thanks for reporting the issue!!
Post by Olivier Lamy
Post by Isabelle Guimiot
Hi,
I noticed that checksum files were always created again on all the
Created missing checksum file
/archiva_install/repositories/internal/com/company/project/myjar/1.2/myjar-1.2.jarsha1
There's a dot missing at the end of the path, should be myjar-1.2.jar.sha1
instead of myjar-1.2.jarsha1 , and I think this issue comes from this line
File checksumFile = new File( this.repositoryDir, path +
checksumAlgorithm[0].getExt() );
File checksumFile = new File( this.repositoryDir, path + "." +
checksumAlgorithm[0].getExt() );
Because without the dot, it doesn't find the checksum file, wrongly thinks
it's missing, and re-creates it ! It's not a blocker bug, but it slows down
large repos scanning...
Sounds definitely a bug :-)
Post by Isabelle Guimiot
Need a jira for this ?
Yes please (just to have a reminder :-) )
Post by Isabelle Guimiot
Thanks !
Isabelle
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Isabelle Guimiot
2015-03-23 10:19:13 UTC
Permalink
Ok, you can close this issue : https://jira.codehaus.org/browse/MRM-1879 ;)
Post by Olivier Lamy
so I had a bit of time and fixed that.
Thanks for reporting the issue!!
Post by Olivier Lamy
Post by Isabelle Guimiot
Hi,
I noticed that checksum files were always created again on all the
Created missing checksum file
/archiva_install/repositories/internal/com/company/project/myjar/1.2/myjar-1.2.jarsha1
Post by Olivier Lamy
Post by Isabelle Guimiot
There's a dot missing at the end of the path, should be
myjar-1.2.jar.sha1
Post by Olivier Lamy
Post by Isabelle Guimiot
instead of myjar-1.2.jarsha1 , and I think this issue comes from this
line
Post by Olivier Lamy
Post by Isabelle Guimiot
File checksumFile = new File( this.repositoryDir, path +
checksumAlgorithm[0].getExt() );
File checksumFile = new File( this.repositoryDir, path + "." +
checksumAlgorithm[0].getExt() );
Because without the dot, it doesn't find the checksum file, wrongly
thinks
Post by Olivier Lamy
Post by Isabelle Guimiot
it's missing, and re-creates it ! It's not a blocker bug, but it slows down
large repos scanning...
Sounds definitely a bug :-)
Post by Isabelle Guimiot
Need a jira for this ?
Yes please (just to have a reminder :-) )
Post by Isabelle Guimiot
Thanks !
Isabelle
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Loading...