| |
@@ -1254,11 +1254,15 @@
|
| |
int lock_status;
|
| |
int lock_count;
|
| |
int rc = 0;
|
| |
+ static PRInt32 warn_done = 0;
|
| |
|
| |
if (rw_monitor_enabled() == MAP_MONITOR_DISABLED) {
|
| |
/* This is not initialized used the old way */
|
| |
- slapi_log_error(SLAPI_LOG_FATAL, "schemacompat",
|
| |
- "map rdlock: old way MAP_MONITOR_DISABLED\n");
|
| |
+ if (warn_done == 0) {
|
| |
+ slapi_log_error(SLAPI_LOG_INFO, "schema-compat",
|
| |
+ " using former locking strategy\n");
|
| |
+ PR_AtomicSet(&warn_done, 1);
|
| |
+ }
|
| |
return wrap_rwlock_rdlock(map_data.lock);
|
| |
}
|
| |
|
| |
@@ -1330,11 +1334,15 @@
|
| |
int lock_status;
|
| |
int lock_count;
|
| |
int rc = 0;
|
| |
+ static PRInt32 warn_done = 0;
|
| |
|
| |
if (rw_monitor_enabled() == MAP_MONITOR_DISABLED) {
|
| |
/* This is not initialized used the old way */
|
| |
- slapi_log_error(SLAPI_LOG_FATAL, "schema-compat",
|
| |
- "map wrlock: old way MAP_MONITOR_DISABLED\n");
|
| |
+ if (warn_done == 0) {
|
| |
+ slapi_log_error(SLAPI_LOG_INFO, "schema-compat",
|
| |
+ " using former locking strategy\n");
|
| |
+ PR_AtomicSet(&warn_done, 1);
|
| |
+ }
|
| |
return wrap_rwlock_wrlock(map_data.lock);
|
| |
}
|
| |
|
| |
@@ -1431,11 +1439,15 @@
|
| |
int lock_status;
|
| |
int lock_count;
|
| |
int rc = 0;
|
| |
+ static PRInt32 warn_done = 0;
|
| |
|
| |
if (rw_monitor_enabled() == MAP_MONITOR_DISABLED) {
|
| |
/* This is not initialized used the old way */
|
| |
- slapi_log_error(SLAPI_LOG_FATAL, "schema-compat",
|
| |
- "map_unlock: old way MAP_MONITOR_DISABLED\n");
|
| |
+ if (warn_done == 0) {
|
| |
+ slapi_log_error(SLAPI_LOG_INFO, "schema-compat",
|
| |
+ " using former locking strategy\n");
|
| |
+ PR_AtomicSet(&warn_done, 1);
|
| |
+ }
|
| |
return wrap_rwlock_unlock(map_data.lock);
|
| |
}
|
| |
|
| |
Bug Description:
With 1435663 slapi-nis (schema-compat / NIS) uses a new locking
mechanisme. This locking mechanism is initialized with schema-compat
init function, so if it is not enabled and NIS is enabled
the new mechanism is not initialized.
NIS plugin then fallback to old locking mechanism.
The problem is that it continuously logs an alarming message.
Fix Description:
If slapi-nis fallback to old locking mechanism, it logs
a single information message.
https://bugzilla.redhat.com/show_bug.cgi?id=1768156
Reviewed by: ?
Platforms tested: F31
Flag Day: no
Doc impact: no