projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reset error for retrieve. Remove sleep call
[idzebra-moved-to-github.git]
/
index
/
zebraapi.c
diff --git
a/index/zebraapi.c
b/index/zebraapi.c
index
e13c05e
..
6537b0d
100644
(file)
--- a/
index/zebraapi.c
+++ b/
index/zebraapi.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2002, Index Data
* All rights reserved.
*
* Copyright (C) 1995-2002, Index Data
* All rights reserved.
*
- * $Id: zebraapi.c,v 1.58 2002-04-23 18:07:17 adam Exp $
+ * $Id: zebraapi.c,v 1.61 2002-07-03 14:10:12 adam Exp $
*/
#include <assert.h>
*/
#include <assert.h>
@@
-37,7
+37,7
@@
static void zebra_chdir (ZebraService zh)
static void zebra_flush_reg (ZebraHandle zh)
{
static void zebra_flush_reg (ZebraHandle zh)
{
- zebraExplain_flush (zh->reg->zei, 1, zh);
+ zebraExplain_flush (zh->reg->zei, zh);
extract_flushWriteKeys (zh);
zebra_index_merge (zh);
extract_flushWriteKeys (zh);
zebra_index_merge (zh);
@@
-50,9
+50,6
@@
static struct zebra_register *zebra_register_open (ZebraService zs,
const char *reg_path);
static void zebra_register_close (ZebraService zs, struct zebra_register *reg);
const char *reg_path);
static void zebra_register_close (ZebraService zs, struct zebra_register *reg);
-static int zebra_begin_read (ZebraHandle zh);
-static void zebra_end_read (ZebraHandle zh);
-
ZebraHandle zebra_open (ZebraService zs)
{
ZebraHandle zh;
ZebraHandle zebra_open (ZebraService zs)
{
ZebraHandle zh;
@@
-304,7
+301,7
@@
static void zebra_register_close (ZebraService zs, struct zebra_register *reg)
zebra_chdir (zs);
if (reg->records)
{
zebra_chdir (zs);
if (reg->records)
{
- zebraExplain_close (reg->zei, 0);
+ zebraExplain_close (reg->zei);
dict_close (reg->dict);
if (reg->matchDict)
dict_close (reg->matchDict);
dict_close (reg->dict);
if (reg->matchDict)
dict_close (reg->matchDict);
@@
-667,6
+664,8
@@
void zebra_records_retrieve (ZebraHandle zh, ODR stream,
zh->errString = odr_strdup (stream, setname);
return;
}
zh->errString = odr_strdup (stream, setname);
return;
}
+
+ zh->errCode = 0;
if (zebra_begin_read (zh))
return;
if (zebra_begin_read (zh))
return;
@@
-922,7
+921,7
@@
void zebra_get_state (ZebraHandle zh, char *val, int *seqno)
xfree (fname);
}
xfree (fname);
}
-static int zebra_begin_read (ZebraHandle zh)
+int zebra_begin_read (ZebraHandle zh)
{
int dirty = 0;
char val;
{
int dirty = 0;
char val;
@@
-988,7
+987,7
@@
static int zebra_begin_read (ZebraHandle zh)
return 0;
}
return 0;
}
-static void zebra_end_read (ZebraHandle zh)
+void zebra_end_read (ZebraHandle zh)
{
(zh->trans_no)--;
{
(zh->trans_no)--;
@@
-1104,6
+1103,8
@@
void zebra_end_trans (ZebraHandle zh)
yaz_log (LOG_LOG, "zebra_end_trans");
rval = res_get (zh->res, "shadow");
yaz_log (LOG_LOG, "zebra_end_trans");
rval = res_get (zh->res, "shadow");
+ zebraExplain_runNumberIncrement (zh->reg->zei, 1);
+
zebra_flush_reg (zh);
zebra_register_close (zh->service, zh->reg);
zebra_flush_reg (zh);
zebra_register_close (zh->service, zh->reg);
@@
-1191,9
+1192,6
@@
int zebra_commit (ZebraHandle zh)
zebra_set_state (zh, 'c', seqno);
logf (LOG_LOG, "commit start");
zebra_set_state (zh, 'c', seqno);
logf (LOG_LOG, "commit start");
-#ifndef WIN32
- sleep (2);
-#endif
bf_commitExec (bfs);
#ifndef WIN32
sync ();
bf_commitExec (bfs);
#ifndef WIN32
sync ();