[ 
https://issues.apache.org/jira/browse/LUCENE-10143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17424039#comment-17424039
 ] 

Uwe Schindler edited comment on LUCENE-10143 at 10/4/21, 5:09 PM:
------------------------------------------------------------------

My alternate proposal would be to add FilterIndexOutput and FilterIndexOutput 
base classes that by default delegates all methods to "in". I won't change the 
default methods in DataInput/DataOutput. The issue here is the usual problem 
with those filter classes (we had similar issues in TermsEnum or postings). So 
RateLimitedIndexOutput should extend FilterIndexOutput and can be safe that 
everything is delegated 1:1.

The problem of the current impl of RateLimitedIndexOutput  is also that 
optimized implementations of writeVLong/writeVInt in the delegate are not used, 
because those are not delegated. That's the main issue.

So my strong -1 to merge the PR! Fix the delegator issue! I'd be happy to add 
an @Delegated annotation and add a javac compiler plugin that makes sure 
everything non-final is delegated (we have that already for checking Javadocs). 
The @Delegated annotation would be added to the above FilterDataOutput and 
possibly all other Filter* classes.


was (Author: thetaphi):
My alternate proposal would be to add FilterIndexOutput and FilterIndexOutput 
base classes that by default delegates all methods to "in". I won't change the 
default methods in DataInput/DataOutput. The issue here is the usual problem 
with those filter classes (we had similar issues in TermsEnum or postings). So 
RateLimitedIndexOutput should extend FilterIndexOutput and can be safe that 
everything is delegated 1:1.

The problem of the current impl of RateLimitedIndexOutput  is also that 
optimized implementations of writeVLong/writeVInt in the delegate are not used, 
because those are not delegated. That's the main issue.

So my strong -1 to merge the PR! Fix the delegator issue. I'd be happy to add 
an @Delegated attribute and add a javac compiler plugin that makes sure 
everything non-final is delegated (we have that already for checking Javadocs). 
The @Delegated attribute would be added to the above FilterDataOutput and 
possibly all other Filter* classes.

> RateLimitedIndexOutput should delegate writeShort/writeInt/writeLong
> --------------------------------------------------------------------
>
>                 Key: LUCENE-10143
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10143
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Otherwise merges are not taking advantage of LUCENE-10125.
> cc [~uschindler]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to