Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f39f3b1b
Commit
f39f3b1b
authored
Nov 23, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
parents
8acbdf70
c9f8b7b4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
26 deletions
+64
-26
storage/ndb/src/common/portlib/NdbThread.c
storage/ndb/src/common/portlib/NdbThread.c
+11
-4
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
+1
-1
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+2
-0
storage/ndb/src/ndbapi/Ndb.cpp
storage/ndb/src/ndbapi/Ndb.cpp
+6
-1
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+41
-17
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
+1
-1
storage/ndb/test/ndbapi/bank/BankLoad.cpp
storage/ndb/test/ndbapi/bank/BankLoad.cpp
+1
-1
storage/ndb/test/run-test/make-config.sh
storage/ndb/test/run-test/make-config.sh
+1
-1
No files found.
storage/ndb/src/common/portlib/NdbThread.c
View file @
f39f3b1b
...
...
@@ -115,10 +115,13 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
pthread_attr_init
(
&
thread_attr
);
#if (SIZEOF_CHARP == 8)
pthread_attr_setstacksize
(
&
thread_attr
,
2
*
thread_stack_size
);
#else
pthread_attr_setstacksize
(
&
thread_attr
,
thread_stack_size
);
thread_stack_size
*=
2
;
#endif
#ifdef PTHREAD_STACK_MIN
if
(
thread_stack_size
<
PTHREAD_STACK_MIN
)
thread_stack_size
=
PTHREAD_STACK_MIN
;
#endif
pthread_attr_setstacksize
(
&
thread_attr
,
thread_stack_size
);
#ifdef USE_PTHREAD_EXTRAS
/* Guard stack overflow with a 2k databuffer */
pthread_attr_setguardsize
(
&
thread_attr
,
2048
);
...
...
@@ -133,7 +136,11 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
&
thread_attr
,
ndb_thread_wrapper
,
tmpThread
);
assert
(
result
==
0
);
if
(
result
!=
0
)
{
NdbMem_Free
((
char
*
)
tmpThread
);
tmpThread
=
0
;
}
pthread_attr_destroy
(
&
thread_attr
);
DBUG_PRINT
(
"exit"
,(
"ret: %lx"
,
tmpThread
));
...
...
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
View file @
f39f3b1b
...
...
@@ -66,13 +66,13 @@ struct BlockInfo {
};
static
BlockInfo
ALL_BLOCKS
[]
=
{
{
NDBFS_REF
,
0
,
2000
,
2999
},
{
DBTC_REF
,
1
,
8000
,
8035
},
{
DBDIH_REF
,
1
,
7000
,
7173
},
{
DBLQH_REF
,
1
,
5000
,
5030
},
{
DBACC_REF
,
1
,
3000
,
3999
},
{
DBTUP_REF
,
1
,
4000
,
4007
},
{
DBDICT_REF
,
1
,
6000
,
6003
},
{
NDBFS_REF
,
0
,
2000
,
2999
},
{
NDBCNTR_REF
,
0
,
1000
,
1999
},
{
QMGR_REF
,
1
,
1
,
999
},
{
CMVMI_REF
,
1
,
9000
,
9999
},
...
...
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
f39f3b1b
...
...
@@ -122,6 +122,8 @@ AsyncFile::doStart()
stackSize
,
(
char
*
)
&
buf
,
NDB_THREAD_PRIO_MEAN
);
if
(
theThreadPtr
==
0
)
ERROR_SET
(
fatal
,
NDBD_EXIT_MEMALLOC
,
""
,
"Could not allocate file system thread"
);
NdbCondition_Wait
(
theStartConditionPtr
,
theStartMutexPtr
);
...
...
storage/ndb/src/ndbapi/Ndb.cpp
View file @
f39f3b1b
...
...
@@ -1300,7 +1300,12 @@ Uint64 Ndb::getLatestGCI()
void
Ndb
::
setReportThreshEventGCISlip
(
unsigned
thresh
)
{
theEventBuffer
->
m_gci_slip_thresh
=
thresh
;
if
(
theEventBuffer
->
m_free_thresh
!=
thresh
)
{
theEventBuffer
->
m_free_thresh
=
thresh
;
theEventBuffer
->
m_min_free_thresh
=
thresh
;
theEventBuffer
->
m_max_free_thresh
=
100
;
}
}
void
Ndb
::
setReportThreshEventFreeMem
(
unsigned
thresh
)
...
...
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
View file @
f39f3b1b
...
...
@@ -539,6 +539,8 @@ NdbEventBuffer::NdbEventBuffer(Ndb *ndb) :
m_latestGCI
(
0
),
m_total_alloc
(
0
),
m_free_thresh
(
10
),
m_min_free_thresh
(
10
),
m_max_free_thresh
(
100
),
m_gci_slip_thresh
(
3
),
m_dropped_ev_op
(
0
),
m_active_op_count
(
0
)
...
...
@@ -635,8 +637,6 @@ int NdbEventBuffer::expand(unsigned sz)
EventBufData_chunk
*
chunk_data
=
(
EventBufData_chunk
*
)
NdbMem_Allocate
(
alloc_size
);
m_total_alloc
+=
alloc_size
;
chunk_data
->
sz
=
sz
;
m_allocated_data
.
push_back
(
chunk_data
);
...
...
@@ -902,8 +902,8 @@ NdbEventBuffer::execSUB_GCP_COMPLETE_REP(const SubGcpCompleteRep * const rep)
assert
(
bucket
->
m_data
.
m_count
);
#endif
m_complete_data
.
m_data
.
append
(
bucket
->
m_data
);
reportStatus
();
}
reportStatus
();
bzero
(
bucket
,
sizeof
(
Gci_container
));
bucket
->
m_gci
=
gci
+
ACTIVE_GCI_DIRECTORY_SIZE
;
bucket
->
m_gcp_complete_rep_count
=
m_system_nodes
;
...
...
@@ -1356,23 +1356,47 @@ NdbEventBuffer::reportStatus()
else
apply_gci
=
latest_gci
;
if
(
100
*
m_free_data_sz
<
m_free_thresh
*
m_total_alloc
||
latest_gci
-
apply_gci
>=
m_gci_slip_thresh
)
if
(
100
*
m_free_data_sz
<
m_min_free_thresh
*
m_total_alloc
&&
m_total_alloc
>
1024
*
1024
)
{
/* report less free buffer than m_free_thresh,
next report when more free than 2 * m_free_thresh
*/
m_min_free_thresh
=
0
;
m_max_free_thresh
=
2
*
m_free_thresh
;
goto
send_report
;
}
if
(
100
*
m_free_data_sz
>
m_max_free_thresh
*
m_total_alloc
&&
m_total_alloc
>
1024
*
1024
)
{
/* report more free than 2 * m_free_thresh
next report when less free than m_free_thresh
*/
m_min_free_thresh
=
m_free_thresh
;
m_max_free_thresh
=
100
;
goto
send_report
;
}
if
(
latest_gci
-
apply_gci
>=
m_gci_slip_thresh
)
{
Uint32
data
[
8
];
data
[
0
]
=
NDB_LE_EventBufferStatus
;
data
[
1
]
=
m_total_alloc
-
m_free_data_sz
;
data
[
2
]
=
m_total_alloc
;
data
[
3
]
=
0
;
data
[
4
]
=
apply_gci
&
~
(
Uint32
)
0
;
data
[
5
]
=
apply_gci
>>
32
;
data
[
6
]
=
latest_gci
&
~
(
Uint32
)
0
;
data
[
7
]
=
latest_gci
>>
32
;
m_ndb
->
theImpl
->
send_event_report
(
data
,
8
);
goto
send_report
;
}
return
;
send_report:
Uint32
data
[
8
];
data
[
0
]
=
NDB_LE_EventBufferStatus
;
data
[
1
]
=
m_total_alloc
-
m_free_data_sz
;
data
[
2
]
=
m_total_alloc
;
data
[
3
]
=
0
;
data
[
4
]
=
apply_gci
&
~
(
Uint32
)
0
;
data
[
5
]
=
apply_gci
>>
32
;
data
[
6
]
=
latest_gci
&
~
(
Uint32
)
0
;
data
[
7
]
=
latest_gci
>>
32
;
m_ndb
->
theImpl
->
send_event_report
(
data
,
8
);
#ifdef VM_TRACE
assert
(
m_total_alloc
>=
m_free_data_sz
);
assert
(
m_total_alloc
>=
m_free_data_sz
);
#endif
}
}
template
class
Vector
<
Gci_container
>;
...
...
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
View file @
f39f3b1b
...
...
@@ -271,7 +271,7 @@ public:
unsigned
m_total_alloc
;
// total allocated memory
// threshholds to report status
unsigned
m_free_thresh
;
unsigned
m_free_thresh
,
m_min_free_thresh
,
m_max_free_thresh
;
unsigned
m_gci_slip_thresh
;
NdbError
m_error
;
...
...
storage/ndb/test/ndbapi/bank/BankLoad.cpp
View file @
f39f3b1b
...
...
@@ -23,7 +23,7 @@
*/
struct
AccountTypesStruct
{
int
id
;
const
char
*
descr
;
const
char
descr
[
64
]
;
};
const
AccountTypesStruct
accountTypes
[]
=
{
{
0
,
"KASSA"
},
...
...
storage/ndb/test/run-test/make-config.sh
View file @
f39f3b1b
...
...
@@ -44,7 +44,7 @@ add_proc (){
;;
mysqld
)
echo
"
$proc_no
.mysqld"
>>
$dir_file
echo
"[
ndb_mgm
d]"
>>
$config_file
echo
"[
mysql
d]"
>>
$config_file
echo
"Id:
$node_id
"
>>
$config_file
echo
"HostName:
$2
"
>>
$config_file
node_id
=
`
expr
$node_id
+ 1
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment