Rethink softCommit=true|false param on commits?

评:原文链接见:https://issues.apache.org/jira/browse/SOLR-3539
这篇文章对理解openSearcher和softcommit两个参数的含义非常有帮助,
并预计会在Solr5.0中实现新的参数组合flush/openSearcher以降低混淆性。

[SOLR-3539]
I think current NRT options when doing a commit, particularly "openSearcher="true|false" and "softCommit=true|false", is confusing, we should rethink them before they get into user API in 4.0.

Issue Links

related:   New Feature - A new feature of the product, which has yet to be developed. SOLR-4370 Ability to control the commit behaviour of commitWithin
All comments:

Hoss Man added a comment - 12/Jun/12 21:02

This is something that started to concern me while trying to update the tutorial. I'm having a hard time articulating my concerns to myself, so this will largely be stream of consciousness...

Both of these params seen defined more in terms of what they don't do then what they actually do – softCommit in particular – and while they aren't too terrible to explain indivdually, it's very hard to clearly articulate how they interplay with eachother.

  • openSearcher
    • true - opens a new searcher against this commit point
    • false - does not open a new searcher against this commit point
  • softCommit
    • true - a new searcher is opened against the commit point, but no data is flushed to disk.
    • false - the commit point is flushed to disk.

Certain combinations of these params seem redundent (openSearcher=true&softCommit=true) while others not only make no sense, but are directly contradictory (openSearcher=false&softCommit=true)...

 softCommit=truesoftCommit=false
openSearcher=trueopenSearcher is redundentOK
openSearcher=falsecontradictory (openSearcher is currently ignored)OK

From a vocabulary standpoint, they also seem confusing to understand. Consider a new user, starting with the 4x example which contains the following...

  <autoCommit> 
    <maxTime>15000</maxTime> 
    <openSearcher>false</openSearcher> 
  </autoCommit>

Documents this user adds will automaticly get flushed to disk, but won't be visible in search results until the user takes some explicit action. The user, upon reading some docs or asking on the list will become aware that he needs to open a new searcher, and will be guided to "do a commit" (or maybe a commit explicitly adding openSearcher=true). But this is actually overkill for what the user needs, because it will also flush any pending docs to disk. All the user really needs to "open a new searcher" is to do an explicit commit with softCommit=true.


I would like to suggest that we throw out the the "softCommit" param and replace it with a "flush" (or "flushToDisk" or "persist") param, which is solely concerned with the persistence of the commit, and completely disjoint from "searcher" opening which would be controled entirely with the "openSearcher" param.

  • openSearcher
    • true - opens a new searcher against this commit point
    • false - does not open a new searcher against this commit point
  • flush
    • true - flushes this commit point to stable storage
    • false - does not flush this commit point to stable storage

Making the interaction much easier to understand...

 flush=trueflush=false
openSearcher=trueOKOK
openSearcher=falseOKNo-Op

I've mainly been thinking about this from a user perspective the last few days, so I haven'thad a chance to figure out how much this would impact the internals related to softCommit right now. I supsect there are a lot of places that would need to be tweaked, but hopefully most of them would just involve flipping logic (softCommit=true -> flush=false). The biggest challenges i can think of are:

  • how to deal with the autocommit options in solrconfig.xml. in 3x we supported a single <autoCommit/> block. On the 4x branch we support one <autoCommit/> lock and one <autoSoftCommit/> block – should we continue to do that? would <autoSoftCommit/> just implicitly specify flush=false? or should we try to generalize to support N <autoCommit/> blocks where <openSearcher/> and <flush/> are config options for all of them?
  • event eventlistener – it looks like the SolrEventListener API had a postSoftCommit() method added to it, but it doesn't seem to be configurable in any way – i think this is just for tests, but if it's intentionally being expost we would need to revamp it ... off the cuff i would suggest removing postSoftCommit() changing the postCommit() method to take in some new structure specifying the options on the commit.

Thoughts?


Hoss Man added a comment - 11/Jul/12 23:25

bulk fixing the version info for 4.0-ALPHA and 4.0 all affected issues have "hoss20120711-bulk-40-change" in comment


Yonik Seeley added a comment - 27/Jul/12 11:46

Anyone else have thoughts around this?
One performance concern of mine revolves around "commit" - the vast majority of people used it for visibility of documents, not for persistence at a specific time.

I'm warming to the idea of a "flush" param instead of softCommit, and it seems like perhaps it should default to "false" for 4.0


Robert Muir added a comment - 07/Aug/12 04:43

rmuir20120906-bulk-40-change


Mark Miller added a comment - 27/Aug/12 19:44

I agree we could clean this up.

I worry about flush since it used to mean something else.


Hoss Man added a comment - 27/Aug/12 19:53

I worry about flush since it used to mean something else.

"persist" ?


Robert Muir added a comment - 15/Sep/12 13:49

Unassigned issues -> 4.1


Steve Rowe added a comment - 23/Jul/13 19:47

Bulk move 4.4 issues to 4.5 and 5.0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
This error message occurs when there is a circular dependency between the properties in the QML code. Specifically, it means that the property "currentIndex" is dependent on itself or on another property that is dependent on "currentIndex". This can happen when a property is trying to update itself based on its own value, or when there is a recursive relationship between two or more properties. To fix this error, you will need to identify the source of the circular dependency and break the loop. This may involve reorganizing your QML code or using a different approach to your data binding. Here are some tips for troubleshooting and resolving the issue: 1. Check your property assignments: Look for any properties that are assigned to themselves or to another property that depends on them. For example: currentIndex: someOtherProperty + currentIndex This kind of assignment creates a circular dependency and will trigger the error message. 2. Use property aliases: If you have two properties that depend on each other, you can use property aliases to avoid the circular dependency. For example: property alias myPropertyAlias: myProperty property int myProperty: myPropertyAlias + 1 This way, both properties can be updated independently without causing a loop. 3. Use a different approach: If you cannot break the circular dependency using property aliases or other techniques, you may need to rethink your approach to the data binding. This may involve using a different data model or a different QML component to achieve your desired result. Overall, the "Binding loop detected" error is a common issue in QML development, but it can be resolved with some careful analysis and troubleshooting. By identifying the source of the circular dependency and breaking the loop, you can ensure that your QML code runs smoothly and without errors.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值