File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -230,14 +230,23 @@ void BatchInsertProc::buildLastPkg(messageqcpp::ByteStream& bs)
230
230
bs << rt;
231
231
}
232
232
233
+ uint32_t BatchInsertProc::selectNextPM ()
234
+ {
235
+ uint32_t pm;
236
+ do
237
+ {
238
+ pm = fBatchLoader ->selectNextPM ();
239
+ } while (pm != 0 && fWEClient ->isConnectionReadonly (pm));
240
+ return pm;
241
+ }
233
242
void BatchInsertProc::sendFirstBatch ()
234
243
{
235
244
uint32_t firstPmId = 0 ;
236
245
int rc = 0 ;
237
246
238
247
try
239
248
{
240
- firstPmId = fBatchLoader -> selectNextPM ();
249
+ firstPmId = selectNextPM ();
241
250
}
242
251
catch (std::exception& ex)
243
252
{
@@ -268,7 +277,7 @@ void BatchInsertProc::sendNextBatch()
268
277
269
278
try
270
279
{
271
- fCurrentPMid = fBatchLoader -> selectNextPM ();
280
+ fCurrentPMid = selectNextPM ();
272
281
}
273
282
catch (std::exception& ex)
274
283
{
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ class BatchInsertProc
68
68
void setHwm ();
69
69
void receiveAllMsg ();
70
70
void receiveOutstandingMsg ();
71
+ uint32_t selectNextPM ();
71
72
72
73
private:
73
74
SP_PKG fInsertPkgQueue ;
You can’t perform that action at this time.
0 commit comments