Skip to content

Commit 851fd91

Browse files
committed
communication: count null samples as successful so they get deleted
sidenote: should probably return rowIds and not successCount
1 parent 1db2c60 commit 851fd91

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

caratApp/src/main/java/edu/berkeley/cs/amplab/carat/android/protocol/CommunicationManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ public int uploadSamples(Collection<Sample> samples, double countSoFar, double s
136136
registerOnFirstRun(rpcService);
137137
for(Sample sample : samples){
138138
try {
139+
if(sample == null){
140+
successCount++; // Delete null samples
141+
continue;
142+
}
139143
boolean duplicate = Sampler.essentiallyIdentical(sample, previousSample);
140144
boolean success = false;
141145
if(!duplicate){ // We skip upload on duplicates

0 commit comments

Comments
 (0)