Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

IndexCache.java have a code error #14

Closed
qddxct opened this issue May 24, 2012 · 1 comment
Closed

IndexCache.java have a code error #14

qddxct opened this issue May 24, 2012 · 1 comment

Comments

@qddxct
Copy link

qddxct commented May 24, 2012

1,
IndexCache.java public void releaseLogSearch(File indexDirectory) method
shoud be -- --holder.useCount; not -- --holder.lastUse

2, IndexResource.java
the mehtod
@path("get/{index-name}/{doc-id}")
@get
@produces(MediaType.APPLICATION_JSON)
public Response getResult(@PathParam("index-name") String indexName, @PathParam("doc-id") int docId) throws Exception {

not have
finally {
context.getExhibitor().getIndexCache().releaseLogSearch(logSearch.getFile());
}
It should be.

3,StandardProcessOperations.java
cleanupInstance method
not use for zookeeper 3.4.0 ,I had mailed to you !

4, IndexerUtil.java
startIndexing () method
then ZooKeeperLogParser.java
public ZooKeeperLogParser(InputStream log) throws IOException
{
logStream = BinaryInputArchive.getArchive(log);

    FileHeader fhdr = new FileHeader();
    fhdr.deserialize(logStream, "fileheader");
    validHeader = (fhdr.getMagic() == FileTxnLog.TXNLOG_MAGIC);
}

when new index use “Use Current Logs” the radio
two question :1, The zkdata/version-2/ Directory not only hava log.xxx ,It contains snapshot 等 it can/t work
2. are you suce log is DirectoryInputStream can work?

if Directory only hava log.xxx,It can work ,but only one file can be indexed。 not the max zxid log。
so ,Now I changed the code just to indexed the max zxid log.
because I do not know your purpose 。

@Randgalt
Copy link
Contributor

1, 2 and 3 are fixed and pushed. They will be in the next release. For 4, please create a pull request and I'll look at it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants