File: cluster.h

package info (click to toggle)
virtuoso-opensource 6.1.6+dfsg2-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 260,992 kB
  • ctags: 125,220
  • sloc: ansic: 652,748; sql: 458,419; xml: 282,834; java: 61,031; sh: 40,031; cpp: 36,890; cs: 25,240; php: 12,692; yacc: 9,523; lex: 7,018; makefile: 6,157; jsp: 4,484; awk: 1,643; perl: 1,013; ruby: 1,003; python: 326
file content (123 lines) | stat: -rw-r--r-- 3,704 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
 *  $Id$
 *
 *  Cluster data structures
 *
 *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 *  project.
 *
 *  Copyright (C) 1998-2012 OpenLink Software
 *
 *  This project is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License as published by the
 *  Free Software Foundation; only version 2 of the License, dated June 1991.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 */

#ifndef _CLUSTER_H
#define _CLUSTER_H

#include "../Dk/Dkhash64.h"



typedef void cl_req_group_t;
typedef struct cl_listener_s
{
  int32			cll_this_host;
  int32			cll_master_host;
  int32			cll_max_host; /* highest used host no */
} cl_listener_t;
extern cl_listener_t local_cll;
extern int64 cl_cum_messages;
extern int64 cl_cum_txn_messages;
extern int64 cl_cum_bytes;
extern int64 cl_cum_wait;
extern int64 cl_cum_wait_msec;
caddr_t cl_ddl (query_instance_t * qi, lock_trx_t * lt, caddr_t name, int type, caddr_t trig_table);
void cl_rdf_inf_init (client_connection_t * cli, caddr_t * err_ret);

/* action codes for ddl messages */
#define CLO_DDL_TABLE 1
#define CLO_DDL_PROC 2
#define CLO_DDL_CLUSTER 3
#define CLO_DDL_TYPE 4
#define CLO_DDL_TRIG 5
#define CLO_DDL_ATOMIC 6
#define CLO_DDL_ATOMIC_OVER 7

typedef struct cl_op_s
{
  char		clo_op;
  int		clo_seq_no; /* seq no in the clrg */
  int		clo_nth_param_row; /* no of the param row of the calling sql node */
  mem_pool_t *		clo_pool;
  dk_set_t		clo_clibs; /* the set of hosts serving this */
  union {
    struct {
      struct itc_cluster_s *	itcl;
    } itcl;
  } _;
} cl_op_t;

typedef struct itc_cluster_s
{
  bitf_t	itc_in_order:1;
  bitf_t	itcl_desc_order:1;
  bitf_t	itcl_return_pl:1;
  short			itcl_n_clibs;
  int			itcl_nth_set;
  dbe_column_t **	itcl_out_cols;
  dk_set_t		itcl_out_slots;
  query_frag_t *	itcl_dfg_qf;
  caddr_t *		itcl_qst;
  mem_pool_t *		itcl_pool;
  cl_op_t ***		itcl_param_rows;
  dk_set_t		itcl_last;
} itc_cluster_t;

#define QFID_HOST(i) ((int)(((unsigned int64) (i)) >> 32))

#define CLST_REFRESH 0
#define CLST_SUMMARY 1
#define CLST_DETAILS 2

extern int32 cl_n_hosts;
extern int32 cl_max_hosts;
extern int32 cl_req_batch_size;
extern int32 cl_dfg_batch_bytes;
extern uint32 cl_send_high_water;
extern int32 cl_batches_per_rpc; /* no of rows to send before stopping to wait for a CL_MORE message */
extern int32  cl_res_buffer_bytes; /* no of bytes before sending to client */
extern long dbf_branch_transact_wait;
extern int32 cl_wait_query_delay;

typedef void cu_func_t;

#define CLO_ITCL 16 /* not a message.  A container for a local itc_cluster_t */
#define DKS_TO_CLUSTER 1

#define DKS_QI_DATA(ses)  (*((query_instance_t **)&(ses)->dks_object_temp))
#define DKS_CL_DATA(ses)  NULL
void cl_ts_set_context (table_source_t * ts, itc_cluster_t * itcl, caddr_t * inst, int nth_set);
cl_op_t * clo_allocate (char op);
itc_cluster_t * itcl_allocate (lock_trx_t * lt, caddr_t * inst);
void cl_select_save_env (table_source_t * ts, itc_cluster_t * itcl, caddr_t * inst, cl_op_t * clo, int nth);
int clo_destroy  (cl_op_t * clo);
cl_host_t * cl_name_to_host (char * name);
cu_func_t * cu_func (caddr_t name, int must_find);
caddr_t cl_id_to_iri (query_instance_t * qi, caddr_t id);


extern long dbf_cpt_rb;

#endif