Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

issue40: allow support for partial results from shards

  • Loading branch information...
commit 7bc9ad960f261fdc9fd1d88a99b5e8a76cd5df42 1 parent e63b2fc
@agirbal authored
View
BIN  lib/SwingFast.jar
Binary file not shown
View
BIN  lib/bson.jar
Binary file not shown
View
BIN  lib/mongo.jar
Binary file not shown
View
1  resource/xml/JMongoBrowser.xml
@@ -20,6 +20,7 @@
<CheckBox id="tailable" toolTipText="Tailable means cursor is not closed when the last data is retrieved. You can resume using the cursor later, if more data exists."/>
<CheckBox id="awaitData" toolTipText="Use with TailableCursor. If cursor is at the end of the data, it blocks for a while rather than returning no data."/>
<CheckBox id="exhaust" toolTipText="Stream the data down full blast in multiple 'getMore' packages, on the assumption that the client will fully read all data queried."/>
+ <CheckBox id="partial" toolTipText="Allows mongos to return partial results from a sharded system if any shard is down."/>
<CheckBox id="opLogReplay" toolTipText="Internal replication use only - driver should not set"/>
</Div>
<Div id="writeConcern">
View
5 src/org/mongo/jmongob/OptionDialog.java
@@ -8,8 +8,6 @@
import com.edgytech.swingfast.ComboBox;
import com.edgytech.swingfast.FormDialog;
import com.mongodb.Bytes;
-import com.mongodb.MongoException;
-import com.mongodb.MongoOptions;
import com.mongodb.ReadPreference;
import com.mongodb.WriteConcern;
@@ -25,6 +23,7 @@
noTimeout,
awaitData,
exhaust,
+ partial,
writeFactor,
writePolicy,
writeTimeout,
@@ -44,6 +43,7 @@ void update(int options, WriteConcern wc, ReadPreference rp) {
setBooleanFieldValue(Item.noTimeout, (options & Bytes.QUERYOPTION_NOTIMEOUT) != 0);
setBooleanFieldValue(Item.awaitData, (options & Bytes.QUERYOPTION_AWAITDATA) != 0);
setBooleanFieldValue(Item.exhaust, (options & Bytes.QUERYOPTION_EXHAUST) != 0);
+ setBooleanFieldValue(Item.partial, (options & Bytes.QUERYOPTION_PARTIAL) != 0);
Object w = wc.getWObject();
int wInt = (Integer) (w instanceof Integer ? w : 0);
@@ -70,6 +70,7 @@ int getQueryOptions() {
if (getBooleanFieldValue(Item.noTimeout)) options |= Bytes.QUERYOPTION_NOTIMEOUT;
if (getBooleanFieldValue(Item.awaitData)) options |= Bytes.QUERYOPTION_AWAITDATA;
if (getBooleanFieldValue(Item.exhaust)) options |= Bytes.QUERYOPTION_EXHAUST;
+ if (getBooleanFieldValue(Item.partial)) options |= Bytes.QUERYOPTION_PARTIAL;
return options;
}
Please sign in to comment.
Something went wrong with that request. Please try again.