On 18/04/17 14:34, anuj kumar wrote:
Hey Andy,
Sorry I was on vacation and therefore might have missed a lot of
communication on Jena-Text issue.
Let me try to answer the above ones:
1. ...see below basically points to the "executions" section for Unit
Tests. Surefire plugin gets executed during "test" phase. If we do not skip
it then the Unit Tests will be executed twice. Thats what the statement
means.
2. Client was intentionally made static to avoid recreating the client
every-time the Index class was instantiated.
Random thought:
Is it instantiated very often?
If it is, caching the index might be better than sharing the client.
Andy
I agree there is a concurrency
bug that has cropped in due to this. There are couple of solutions:
1. I synchronize the block with the null check
2. I make client non-static.
I prefer 1st approach, but need input from community.
Thanks,
Anuj Kumar
On Tue, Apr 18, 2017 at 11:46 AM, Andy Seaborne <[email protected]> wrote:
My initial optimism over fixing up jena-text was misplaced.
Currently,
1/ jena-fuseki-server is still 46M, not ~22M
Netty is in twice: as org/jboss/netty/ and io/netty
Half the files in Fuseki are due to ElasticSearch.
2/ It turns out that something uses reflection to trigger code that uses
log4j2. Fixed with for log4j-api and log4j-to-slf4j - but what else lurks?
There is a lot of log4j2 stuff getting in (chainsaw, lf5 and more) despite
the dependencies being for log4j-api and log4j-to-slf4j. It does not look
too big but the question is why is it there at all.
3/ jena-text:pom.xml
says:
<!-- Skip the default running of this plug-in (or everything is run
twice...see below) -->
what is the "below"?
4/ In the code
"client" is a static : is this intentional or a bug?
public TextIndexES(TextIndexConfig config, Client client, String
indexName) {
this.docDef = config.getEntDef();
this.client = client; <<-------Warning
this.indexName = indexName;
}
There is a concurrency but because the static is assigned with an
unprotected:
if(client == null) {
}
Andy